We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
julio_diniz_perdigao
2 years agoExplorer | Level 3
Re: Uploading large files directly from web application.
I know is old but, if refresh the token once the upload connection is done (not the upload process)?
1 - get the token from server-side and pass it to client side
2 - start upload and once the connection is made (or the first bytes is sent), request the server-side to refresh the token.
I don't know if it's work this way, but a think once the connection is made, the token is no more necessary.
Also, using a second dropbox account (a free one) to just upload files and the move it to a payed account.
Is this possible? Or once the token is refreshed, the upload process is canceled?
Thanks!
4 Replies
Replies have been turned off for this discussion
- julio_diniz_perdigao2 years agoExplorer | Level 3
For large files, i know it's not a good practice to expose the credentials, but...
1 - get the token from server-side
2 - use the token to upload from client-side and once the upload starts (or the first bytes are sent), send to server-side to refresh the token.
I guess that, once the upload process start, the token is no more necessary, so you can refresh it.
Also, using a second account (a free one) to just use as upload and move the file to a paid account as soon as the upload finish.
- Greg-DB2 years ago
Dropbox Community Moderator
You can use the refresh process (that is, calling /oauth2/token with grant_type=refresh_token) to get a new short-lived access token using a refresh token at any time, but doing so does not invalidate previous short-lived access tokens.
You can use /2/auth/token/revoke to revoke an access token, but that will also revoke the corresponding refresh token and other short-lived access tokens for that refresh token, if any.
Dropbox also does not offer a guarantee on the timing as to when during the connection/API call the authorization check occurs, so I would not recommend relying on that.
- julio_diniz_perdigao2 years agoExplorer | Level 3
Got it! Dropbox team should really think about implement that. As other people said here, don't make sense upload large files twice, spending time and bandwidth.
- Greg-DB2 years ago
Dropbox Community Moderator
Thanks for the feedback! I'll send it along to the team.
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!