Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Kevin L.28
10 years agoNew member | Level 1
Best Practices for Chunked Upload in Node.js
Hello,
I have had a lot of success so far using the HTTP endpoints to make a web app, but when I tried to switch from a regular upload to a chunked upload I've run into all sorts of problems. P...
Kevin L.28
10 years agoNew member | Level 1
When I say that, I mean that when I console.log the session ID I notice that it was changing each time and I never saw the same one twice.
For example,
AAAAAAAAGJXQJ-U67pHOfg
65536
{"expires": "Sun, 10 Jul 2016 16:40:19 +0000", "upload_id": "AAAAAAAAGJXQJ-U67pHOfg", "offset": 65536}
[16:40:19.709Z] INFO wt: Chunked upload called for: /tmp/get-pip.py
[16:40:19.709Z] INFO wt:
AAAAAAAAGJkcP0WgJC2wAQ
16384
{"expires": "Sun, 10 Jul 2016 16:40:19 +0000", "upload_id": "AAAAAAAAGJkcP0WgJC2wAQ", "offset": 16384}
What I realized was that my chunkedUpload() function was being called over and over again for some unknown reason, and that I was actually getting correct files in my Dropbox so long as they were small enough to fit in a single chunk, so I believe my code is likely mostly correct here but the problem is external to the upload function.
Thus it makes sense why I was getting more than one ID, the upload_session/start endpoint is getting hit multiple times and I need to find a way in my code to make sure it only attempts this once per file.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!