File Exchange

image thumbnail

Upload files to your DropBox folder from MATLAB

version (2.42 KB) by Vinod
This function allows a user to upload files using MATLAB to DropBox(TM).


Updated 18 Jan 2018

View License

This function allows a user to upload files using MATLAB to DropBox. The function does not require the user to have the DropBox application installed. It uses publicly documented APIs to upload the file to DropBox using the WEBWRITE function in MATLAB.

Cite As

Vinod (2019). Upload files to your DropBox folder from MATLAB (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (9)

Ken Trotti

Matlab User

@Yasser Soltanpour- This function will work and will not make a copy of file if you use the following syntax:

headerFields{2,2} = sprintf('{"path": "/%s%s", "mode": "overwrite","mute": false}',remoteFName, remoteExt);

If this is not working, make ..."mute": true...

This function do not work on MATLAB R2015a.


I like to update a file in dropbox when I make any change in the data in Matlab. Unfortunately, dropbox makes a copy of the existing file with numeric extension. Is there any way to update the dropbox file without making extra copy? Thanks

Paul, the release compatibility for this function indicates that it will work with R2015a or later, however the neither the STRING class nor the HEADERFIELDS property for the WEBOPTIONS object appear to exist in MATLAB 2015b. Is there a work-around?


Paul: The Dropbox access token is just a string, so there is no limit on how long it can be. You'd call this function like this:

uploadToDropbox('YOUR VERY LONG ACCESS TOKEN HERE', 'c:\foobar.txt')

My access token exceeds the MATLAB maximum name length of 63 characters and is truncated. How can I do?


It appears DropBox changed their API. I updated the function to use the new API. Try getting the latest version of the file.

Ankita Pal

Undefined function or variable 'weboptions'
How to remove this error


Change the title of the FX entry

Updated to use v2 of DropBox API

Bug fix.

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux