How to download file from dropbox using e.g. websave?

7 views (last 30 days)
Jakob Sievers
Jakob Sievers on 24 Jan 2018
Commented: Rik on 24 Jan 2018
Hi there
How does one download a shared file (public visibility) from dropbox? I used to use the following code to achieve the task, but I suspect that dropbox has changed something because now it doesnt work as before:
outfilename = websave(filename,'');
where the file "" is a 43mb zip file. From matlab it downloads only 330kb of the file but in a webbrowser it downloads the whole thing. Can anyone help me?
Thanks in advance!

Accepted Answer

Rik on 24 Jan 2018
For me using ?dl=1 instead of ?dl=0 did the trick.
Rik on 24 Jan 2018
If you try both links in a browser, you can see that dl=1 activates the download immediately, while dl=0 shows you a page that asks for confirmation. Which Matlab can then dutifully write to a nonsense file of 300 kb.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!