Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I am trying to upload a zip file using the files_upload method. When I use a regular zip file (not password protected) it works. However, when I use a password-protected zip file the process takes a long time and eventually output the following error:
Traceback (most recent call last):
File "/Users/shifloni/Desktop/walk.py", line 17, in <module>
dp.files_upload(enc, '/encrypted/test.zip')
File "/Users/shifloni/dev/law_venv/lib/python2.7/site-packages/dropbox/base.py", line 377, in files_upload
f)
File "/Users/shifloni/dev/law_venv/lib/python2.7/site-packages/dropbox/dropbox.py", line 175, in request
request_binary)
File "/Users/shifloni/dev/law_venv/lib/python2.7/site-packages/dropbox/dropbox.py", line 256, in request_json_string_with_retry
request_binary)
File "/Users/shifloni/dev/law_venv/lib/python2.7/site-packages/dropbox/dropbox.py", line 316, in request_json_string
verify=True,
File "/Users/shifloni/dev/law_venv/lib/python2.7/site-packages/requests/sessions.py", line 504, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/Users/shifloni/dev/law_venv/lib/python2.7/site-packages/requests/sessions.py", line 461, in request
resp = self.send(prep, **send_kwargs)
File "/Users/shifloni/dev/law_venv/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/Users/shifloni/dev/law_venv/lib/python2.7/site-packages/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
Has anyone encountered that type of error when uploading password protected zip files using the API?
Thanks
The API doesn't pay attention to whether or not a zip file is password protected while uploading it (nor does the file type itself even really matter). It just uploads the raw data as it receives it.
How big is each file though? Is this repeatedly reproducible?
The file I am able to upload (without a password) is 1.2 MB.
The file I am unable to upload with the password is 186 KB.
The error is repeatedly reproducible. Thanks for your response
Thanks! Those files are small so size shouldn't be an issue here. It is unexpected that the upload takes a long time though. Might there be anything on your network connection (e.g., firewall or security software) that may be interfering for some reason?
In any case, can you share the sample code and files so we can try to reproduce it?
Feel free to open a ticket if you'd prefer to share privately:
https://www.dropbox.com/developers/contact
Thanks in advance!
I actually removed a line from my code that resolved this issue. Thanks for pushing me to look harder 🙂 the issue has something to do with a function I was using to check whether a file is encrypted or not and trying to upload without testing the file first seems to work.
Thanks!
Hi there!
If you need more help you can view your support options (expected response time for a 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!