Forum Discussion

emre's avatar
emre
Explorer | Level 4
8 years ago

Dropbox direct upload files from browser

I use php sdk

Bir dosya yükleme formum var

Normalde, dosya ilk önce sunucuya yüklenir ve daha sonra dropbox'a yüklenir

Ancak, bu, büyük dosyalarda zaman kaybı ve kaynak tüketimine neden olur

Dosyayı tarayıcıdan doğrudan yüklemenin bir yolu var mı?

e.g. 

 

{

<form action="myFile.php" method="post" enctype="multipart/form-data">

<input type="file" name="file" >
<input type="submit" >
</form>

 

}

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    For a server-side integration, such as when using PHP, it would be inefficient to upload to your server first and then to the Dropbox API.

    You can avoid this by writing the Dropbox API functionality to run client-side instead. For example, you can use the API v2 JavaScript SDK:

    https://github.com/dropbox/dropbox-sdk-js

    Note that you should only do this if you are uploading to the user's own Dropbox account. Writing the integration to run client-side necessarily exposes the access token to the user. If you are instead trying to always upload to a single Dropbox account, this would be a security issue in that you'd be exposing the access token to the user.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,948 PostsLatest Activity: 6 hours ago
351 Following

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!