cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Shared media files with ?dl=1 parameter not working in mobile iOS Safari browsers

Shared media files with ?dl=1 parameter not working in mobile iOS Safari browsers

De L.1
Collaborator | Level 9

Hello Dropboxers,

 

I suddently encounter problems loading media files via a shared link with the ?dl=1 parameter in (at least) the iOS Safari browser.

 

The following sharing links work fine in most browsers, but when I open it in Safari on an iPhone (iOS 12, iOS13), the video isn't loaded and the following error is thrown:

 

Blocked script execution in 'https://uc370026e834b1ed1889e14a6d89.dl.dropboxusercontent.com/cd/0/get/A1h…01TRE_tte6eGw55OtWcN_gmA6Ca7SCiBItL1b11zEoC1auqe7sUaLUkBTcCX-VQ/file?dl=1#' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.

 

https://www.dropbox.com/s/c0al0jhjj6hy3a2/Oceanic%20Dawn.mp3?dl=1

https://www.dropbox.com/s/25rn13lnfvtwnky/Avengers%20-%20Endgame%20-%20Trailer.mp4?dl=1

 

BugMediaFiles.png

Is this a known bug?

 

- Floris 

5 Replies 5

Greg-DB
Dropbox Staff

It sounds like this use case would be better served by the 'raw=1' option instead of 'dl=1'. Can you try switching to that and let me know if that doesn't help? Thanks.

De L.1
Collaborator | Level 9

Yes, replacing it with '?raw=1' does prevent this issue from happening.

 

However, I can't change the URL as the use case is that the file should actually be downloaded which it does in all other browsers. Unfortunately, iOS Safari will just start streaming the file (by design) which doesn't work with the '?dl=1' parameter.

Greg-DB
Dropbox Staff

I see, thanks for clarifying. If you do want the download behavior, using "dl=1" is correct.

 

I just tried this myself with a Dropbox shared link to a .mp3 file with "dl=1" in Safari on an iPhone running iOS 13.3.1 though, and upon accessing the link Safari prompts me to choose between "View" and "Download". Choosing "Download" does successfully download the linked file as desired. Are you not getting that prompt?

De L.1
Collaborator | Level 9

I just tried it with a device with the latest iOS version (13.4.1) and I am now seeing the same prompt as well. For some reason that wasn't the case when I initially tested this. It turns out that Apple has finally added the download functionality in mobile Safari as of iOS 13, so it no longer only offers the streaming solution. Good news!

 

That means that the issue basically remains if you are running iOS 12.x or lower and when you press 'View' instead of download as of version 13. Is there still any chance to still solve that?

Greg-DB
Dropbox Staff

I see, thanks for the additional information. Unfortunately, I don't believe that's something we'd be able to support, as the 'dl=1' option is intentionally only configured for downloading, not playing in the browser as Safari is attempting to do.

Need more support?