We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

sebbelese's avatar
sebbelese
Explorer | Level 4
6 years ago
Solved

Intermittent Error 500 when uploading files using temporary upload links (API v2)

I use the API v2 to get temporary upload links for a bunch of files, then they are uploaded to dropbox using POST requests.

 

Most of the files upload OK, but I get error 500 for some files. I am beginner with js, so the issue may be on my side, but the code 500 means server error. Several files are uploaded at the same time (most of them successfully), which may be the cause of the issue.

 

See below some request IDs if useful:

 

ERROR upload fail. Status 500
Response header: content-type: application/json
x-dropbox-request-id: 1ec048e8992cf7ff2a97e2ffc2d23327

 

ERROR upload fail. Status 500
Response header: content-type: application/json
x-dropbox-request-id: 906d4645a06831bf602eb1a3372a73d8

 

ERROR upload fail. Status 500
Response header: content-type: application/json
x-dropbox-request-id: f3eb5ddbbae94be4bed6906cbca03f5e

 

Thanks for any help!

  • Thanks for the report! I just looked into this based on the request IDs, and this is due to "lock contention". You can find more information on that in the Data Ingress Guide. That guide refers to the standard API endpoints, but the same applies to temporary upload links too. We should certainly return a better error message in this case though, so I'll ask the team to update the server to do so.

     

    Anyway, to avoid this, you should perform these uploads one at a time.

3 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    Thanks for the report! I just looked into this based on the request IDs, and this is due to "lock contention". You can find more information on that in the Data Ingress Guide. That guide refers to the standard API endpoints, but the same applies to temporary upload links too. We should certainly return a better error message in this case though, so I'll ask the team to update the server to do so.

     

    Anyway, to avoid this, you should perform these uploads one at a time.

  • sebbelese's avatar
    sebbelese
    Explorer | Level 4
    6 years ago

    Thanks for the fast and clear answer.

     

    I guess there is currently no way to upload a whole set of files together directly from a browser while not sharing the access token publicly. Are the following options the only ones?

    - generate an upload link server-side for each file, then direct upload each file serially to avoid locks

    - upload all files from the client to the web server, then upload batch from the server to dropbox

    - ( direct upload batch from the client to dropbox, with the access token publicly shared )

     

    Thanks

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    Yes, that's correct. I'll pass this along as a feature request, but I can't promise if or when that might be implemented. 

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,035 PostsLatest Activity: 3 years ago
409 Following

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