File Exchange

image thumbnail

Upload files to your DropBox folder from MATLAB

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

9 Downloads

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 (2020). Upload files to your DropBox folder from MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/59673-upload-files-to-your-dropbox-folder-from-matlab), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (15)

kailash sahw shaw

Hi,
does anybody know the answer to this error?
Conversion from cell failed. Element 4 must be convertible to a string scalar.
Error in uploadToDropbox (line52)
headerFields = string(headerFields);
Thank you!

Prajwol Tamrakar

There was an issue for me and it worked after using this

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

Emmanuel Pineda

Marcel Zehner

Hi,
does anybody know the answer to this error?
Conversion from cell failed. Element 4 must be convertible to a string scalar.
Error in uploadToDropbox (line52)
headerFields = string(headerFields);
Thank you!

Noora AlNaimi

Noora AlNaimi

Hello,

I get the following error:
Error using string
Conversion from cell failed. Element 4 must be convertible to a string scalar.

Error in uploadToDropbox (line 49)
headerFields = string(headerFields);

could you please help me?
thanks in advance!

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...

Hiroki Nagashima

This function do not work on MATLAB R2015a.

Yasser Soltanpour

Hi,

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

Michael Kutzer

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?

Vinod

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')

paul bertier

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

Vinod

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

Updates

1.1.0.0

Change the title of the FX entry

1.1.0.0

Updated to use v2 of DropBox API

1.0.1.0

Bug fix.

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