cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Musicians, convert your MuseScore files to PDF to play music on the go! Learn more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Uploading large files directly from web application.

Re: Uploading large files directly from web application.

julio_diniz_perdigao
Explorer | Level 3

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 4

julio_diniz_perdigao
Explorer | 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-DB
Dropbox Staff

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_perdigao
Explorer | 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-DB
Dropbox Staff

Thanks for the feedback! I'll send it along to the team.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    julio_diniz_perdigao Explorer | Level 3
What do Dropbox user levels mean?