Take Your Search Game to the Next Level with Dropbox Dash  🚀✨ Curious how it works? Ask us here! 

Forum Discussion

De L.1's avatar
De L.1
Collaborator | Level 9
6 years ago

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

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

 

Is this a known bug?

 

- Floris 

5 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox 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's avatar
      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's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox 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?

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,989 PostsLatest Activity: 13 minutes ago
378 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!