on 04-28-2017 10:56 AM
Hi All,
We have a requirement to handle the binary data in our application where we can consume the binary data in order to make the uploaded files downloadable to our local system.
In an ideal scenario for the browsers, we send the binary data of an attachment to the Cloud for Customer (C4C) server by the means of an API. Now, we are fetching this data, converting it to BLOB and using the following SAPUI5 library for the file download:
sap.ui.core.util.File.save (blob, fileNameWithoutExt, fileExtension, _mimeType, 'utf-8');
The above approach works in all the browsers except Safari, as Safari doesn’t support file download by BLOB. I have tried several approaches mentioned online where they use FileSaver.js file. It shows the file preview for PNG and JPG files, but doesn't download them.
Any help regarding handling the binary data in Safari which could result in a file download will be appreciated.
Thanks in advance,
Apurv Dawra
Solution: Apparently the problem was with the Safari browsers with versions <10.1. Since version 10.1, BLOB is being supported and SAPUI5 util mentioned above also works as expected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you set the header "Content-Disposition: attachment;" when you try to download the file ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.