Comments (27)
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.
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.
Same with outlook. Please fix it!
from office-js.
Has this been fixed, or possibly an workaround ? Thanks in advance!
from office-js.
@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.
@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.
@shubhashishtiwari Is this for Outlook or Word?
from office-js.
@JuaneloJuanelo it seems this is for Outlook. Please help to reassign. Thanks.
from office-js.
@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.
@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.
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.
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.
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.
We're facing the same issue with outlook on MAC
from office-js.
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.
@exextoc Could you pick up on this? Seems like this happens to a lot of users on Mac Outlook.
from office-js.
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.
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.
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.
@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.
@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.
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.
@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.
@exextoc When using Office.context.ui.openBrowserWindow(URL), can I specify a blob object for the url? It didn't work.
from office-js.
@mailchecktool-admin , can you specify what is the URL you are using which does not work?
from office-js.
@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.
- Download "downloadSample(window.open).zip" and place it in your desired location.
- Launch the command prompt and navigate to the corresponding directory.
- Run "npm install".
- Run "npm run dev-server".
- Upload "manifest.xml" in Outlook on the web to install the add-in. (The XML file is stored in downloadSample(window.open).zip)
- Create and send an email.
.7 Click "download TextFile" button.
from office-js.
@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)
- body.clear() not working for content controls HOT 3
- How to make slide active Or How to insert image using index HOT 4
- Identifying Usage of New Outlook in Office-js Add-ins HOT 1
- Not able to sideload outlook addin. in macbook there is no option to add the manifest file HOT 10
- Inserting Signature with the OnMessageSend event duplicates the signature HOT 1
- The identity API is not supported for this add-in in online Word HOT 2
- Excel Online: calculation state can get stuck in Pending state when workbook contains charts HOT 3
- Addin sample not showing in new look outlook and browsers. HOT 9
- IP Address Range Needed for Microsoft Office Add-in Validation Process HOT 1
- Office API messageParent Outlook on android doesn't work HOT 4
- NAA: Unable to acquire access token for event-based activation (onMessageSend) HOT 2
- Outlook addin using Bootstrap modal or offcanvas bleeds through on Mac version of Outlook. Classic and New Outlook for Mac. HOT 2
- [Word API] Document.compare: ability to specify Original and Revised document?
- Outlook NAA issue: "Something went wrong. [7q6cl]" Error HOT 5
- Web Outlook provides improper attachment data if attachment is still uploading to the email HOT 5
- [Question] Is it safe to use `CustomFunctions.delayinitialization()` HOT 3
- New Outlook - emails stuck in outlook at queued or draft status HOT 3
- context.application.createDocument works only first time HOT 9
- WorkBook level Define name is getting corrupted while reopening excel using base64
- In Outlook, getAllInternetHeadersAsync works on an item in the Inbox, but not the sent folder HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from office-js.