Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
testuser1
8 years agoExplorer | Level 3
API raises exception when uploading big files in session
Hi, I have been trying for a few days to upload a big file into my Dropbox account using the python API, i have tried using the following code: f = open(file_path)
file_size = os.path.getsize(file_...
Steve M.
Dropbox Staff
8 years agoThe root should be "", not "/".
testuser1
8 years agoExplorer | Level 3
whenever i try to use "" as the root dir I get:
dropbox.stone_validators.ValidationError: '' did not match pattern '(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?)'
- Greg-DB8 years ago
Dropbox Community Moderator
Note that when uploading a file, the path you supply should be the entire desired path for the uploaded file, including the file name. I.e., you shouldn't just specify the root path.
For example, to upload a file named "myfile.txt" to the root, your dest_path should be "/myfile.txt". Or, to upload it into a "Documents" folder, the path would be "/Documents/myfile.txt".
(Steve is correct that when identify the root itself though, you would just use "", but that doesn't apply here since this particular call needs the full path for the file.)
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!