Coder Social home page Coder Social logo

Comments (27)

shubhashishtiwari avatar shubhashishtiwari commented on August 10, 2024 4

Cant understand why Microsoft guys are asking all the questions but not relpying at all. @microsoft : Every one is asking question but no one is replying. I have given all the details and the issue looks straightforward to understand but no one is taking it up. Please help to resolve this issue

from office-js.

radhikaalone avatar radhikaalone commented on August 10, 2024

I am getting same issue for word web add ins, On Mac file not downloaded, getting same error but on window desktop its work fine.

from office-js.

pupaxxo avatar pupaxxo commented on August 10, 2024

Same with outlook. Please fix it!

from office-js.

Hombr33 avatar Hombr33 commented on August 10, 2024

Has this been fixed, or possibly an workaround ? Thanks in advance!

from office-js.

SanketDG avatar SanketDG commented on August 10, 2024

@weshi Since you are assigned, is there any update on this? We are facing the issue where javascript file download is not working for Outlook for Mac.

from office-js.

shubhashishtiwari avatar shubhashishtiwari commented on August 10, 2024

@weshi : This issue is blocking the major development for Outlook Web addin on Mac devices.
For windows we have a backup solution of VSTO addin. But for Mac we only have Web addin which is getting blocked because of above issue. Is it possible for you to let us know the tentative timeline of this fix.

from office-js.

weshi avatar weshi commented on August 10, 2024

@shubhashishtiwari Is this for Outlook or Word?

from office-js.

weshi avatar weshi commented on August 10, 2024

@JuaneloJuanelo it seems this is for Outlook. Please help to reassign. Thanks.

from office-js.

shubhashishtiwari avatar shubhashishtiwari commented on August 10, 2024

@weshi : Thanks for the reply.
To your question asked above: Yes, this is issue is coming for outlook.

Details about the issue : We are using displayDialogasync to display our HTML. In that HTML we have our custom files which are showing as attachment. On these attachment, we want to provide users, a functionality of being able to download these files directly. In implementation, we created a Blob URL Object of the attachment and then trying to save it. But during save, download up does not show. Ideally while trying to call the Blob URL object we expected the Mac Download Popup to show up.
The above functionality on Windows outlook client is working perfectly fine. Please let me know if you need more details on the issue

from office-js.

exextoc avatar exextoc commented on August 10, 2024

@shubhashishtiwari Could you please share the code snippet used for download and also let us know the Mac Outlook version in which you are facing this? It would also be helpful if you share a sample attachment you are using to download.

from office-js.

 avatar commented on August 10, 2024

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

from office-js.

shubhashishtiwari avatar shubhashishtiwari commented on August 10, 2024

Thanks for the reply.

Mac Version on which we verified this issue : High Sierra 10.13.6 and Mojave 10.14.6

Details about the issue : We are using displayDialogasync(From office.js) to display our HTML. This HTML is rendering our decrypted email content. Our decrypted email might contain an attachment. So we want to provide user way to download this attachment from our HTML (Displayed using displayDialogasync).

In implementation : We created a Blob URL Object of the attachment from base64 and then trying to save it using saveAs function of library Filesaver.js. But during save, download up does not show. Ideally while trying to call the Blob URL object we expect the Native Mac Download Popup to show up.

Code snippet : High level code(We have stripped some part as part of security but we have written everything which is important from understanding the functionality)

function downloadFile(file) {
blobData = atob (file.fileContent);
blob = new Blob(blobData, { type: contentType });
saveAs(blob, file.fileName);
}

The above functionality on Windows outlook client is working perfectly fine and we are able to see Native Windows download popup while downloading the attachment. On clicking OK, the attachment is saved successfully. But in case of Mac Native download up does not show up at all.

We tried below more approaches but all failed on Mac Outlook and worked fine on Windows Outlook:

  • Blob
  • data URL
  • btoa - atob
  • A tag with download variable

Apart from above approaches we tried other libraries also but all failed on Mac Outlook.

If you want to simulate this issue then from any sample outlook addin you can create a HTML pop using displayDialogasync(from office.js). From that HTML file you can try and download any doc file embedded in that HTML file

Let me know if you need more information

from office-js.

 avatar commented on August 10, 2024

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

from office-js.

ahmedkhalid1710 avatar ahmedkhalid1710 commented on August 10, 2024

We're facing the same issue with outlook on MAC

from office-js.

 avatar commented on August 10, 2024

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

from office-js.

SanketDG avatar SanketDG commented on August 10, 2024

@exextoc Could you pick up on this? Seems like this happens to a lot of users on Mac Outlook.

from office-js.

 avatar commented on August 10, 2024

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

from office-js.

 avatar commented on August 10, 2024

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.

from office-js.

ahmedkhalid1710 avatar ahmedkhalid1710 commented on August 10, 2024

we're in a long run relationship with office.js.
we're using it on multiple hosts word,office,powerpoint,excel.
we're facing this issue on outlook for MAC. it's very important for us to be solved.
Thanks.

from office-js.

exextoc avatar exextoc commented on August 10, 2024

@shubhashishtiwari Sorry for the delay in response.

Thanks for reporting this issue. After careful consideration, our team has decided to not fix this issue in the short term. We are blocked by a WebKit bug.
When we hear back on the WebKit bug, we will re-activate as needed.

from office-js.

exextoc avatar exextoc commented on August 10, 2024

@shubhashishtiwari We would like to suggest a workaround solution for this issue as mentioned in #503. You can call Office.context.ui.openBrowserWindow(URL); with a URL that you own and from there once the full browser opens, create your blob object and get the browser to download the file.
Office.context.ui.openBrowserWindow(url) should be available in office-js-api version: 20200812.3 or later in macOS.

from office-js.

sajaadkhan7 avatar sajaadkhan7 commented on August 10, 2024

I m using word office js add-in on Mac. File download link is not working for me. I am getting no console errors at all. It just does nothing.
I m using following code..

const handleOpenFile = () => {
    var blob = new Blob([fileContent], {
      type: "application/octet-stream",
    });
    var link = document.createElement("a");
    link.href = URL.createObjectURL(blob);
    link.download = pdfFile?.name ? pdfFile.name.replace(/\.pdf$/i, ".docx") : "";
    link.click();
  };

Same code works perfectly for windows version.

from office-js.

exextoc avatar exextoc commented on August 10, 2024

@sajaadkhan7 Can you create a new issue for the problem you are facing, as it seems like different issue and current issue has been closed already.

from office-js.

mailchecktool-admin avatar mailchecktool-admin commented on August 10, 2024

@exextoc When using Office.context.ui.openBrowserWindow(URL), can I specify a blob object for the url? It didn't work.

from office-js.

exextoc avatar exextoc commented on August 10, 2024

@mailchecktool-admin , can you specify what is the URL you are using which does not work?

from office-js.

mailchecktool-admin avatar mailchecktool-admin commented on August 10, 2024

@exextoc
I created a URL for a very simple text file. The sample code is as follows:

const blob = new Blob(["Hello, blob!"], {type: 'text/plain'});
const fileURL = URL.createObjectURL(blob);
console.info(fileURL);
Office.context.ui.openBrowserWindow(fileURL);
console.info("window.open is done");
Is this source code incorrect? If so, what changes should be made to the source code to make it work correctly? Please provide specific guidance on how to write the source code, as I will provide the source code for a sample add-in.
https://drive.google.com/file/d/1et0uKHX_2e8R4UVtCif9KiaevDyG9tG4/view?usp=drive_link

The reproduction steps are as follows.

  1. Download "downloadSample(window.open).zip" and place it in your desired location.
  2. Launch the command prompt and navigate to the corresponding directory.
  3. Run "npm install".
  4. Run "npm run dev-server".
  5. Upload "manifest.xml" in Outlook on the web to install the add-in. (The XML file is stored in downloadSample(window.open).zip)
  6. Create and send an email.
    .7 Click "download TextFile" button.

from office-js.

exextoc avatar exextoc commented on August 10, 2024

@mailchecktool-admin Office.context.ui.openBrowserWindow does not work with file URLs. This is by design.
We track Outlook add-in feature requests on our Tech Community Page. Please submit your request there and choose the appropriate label(s). Feature requests on Tech Community are considered, when we go through our planning process.

from office-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.