Discuss Dropbox Developer & API
[Cross-linking for reference: https://stackoverflow.com/questions/51578432/python3how-to-keep-alive-dropbox-files-upload-so-to-dow... ]
The 'files_upload' method will take and upload whatever data you give it. If you're unexpectedly getting a 0 byte file, the first step in debugging this would be to check on 'ff.read()'. Is that working properly and giving you the data you expect?
I notice that you're running both your 'd' and 'u' methods asychronously though, via 'apply_async'. It looks like 'u' is therefore running before 'd' completes, meaning the file isn't written to disk yet. Accordingly, there's nothing to upload from 'f.read()'. You should make sure you don't run 'u' until 'd' is complete. That's more of a general Python threading question though, and not about Dropbox itself, so I can't offer much help with that.
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 Twitter 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!