You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

ThaiNguyen's avatar
ThaiNguyen
Explorer | Level 4
3 years ago

Use javascript to create and write file csv by api

Hello,

I want to use Javascript call API to create csv file (with data) on Dropbox. 

I have read the API https://content.dropboxapi.com/2/files/upload
As I understand it, is this API used to upload files from local? But that's not the direction I want.

Because I'm using a system called Adaptive, that system uses pure Javascript, I have successfully connected to Dropbox using access token.

But, there is no Localpath for me to use: API 2/files/upload

So, I want to ask is there any way to import or create or write... csv files to Dropbox using Javascript? If there is an API please show me. 

 

I am looking forward to hearing from you.

Thank you very much.

  • The /2/files/upload endpoint allows an app to upload a file to Dropbox by supplying the file data in the API call request body. The example in the documentation shows how one might do so by using curl to upload the contents from a file on the local filesystem, but that is not a requirement. Exactly where/how you get the file data to upload is up to you.

     

    For JavaScript, we recommend using the official Dropbox API v2 JavaScript SDK. That SDK has a corresponding filesUpload method. You can find an example of using it here. That example gets the file data to upload from a file input field in an HTML form, for instance, not directly from a local filesystem.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    The /2/files/upload endpoint allows an app to upload a file to Dropbox by supplying the file data in the API call request body. The example in the documentation shows how one might do so by using curl to upload the contents from a file on the local filesystem, but that is not a requirement. Exactly where/how you get the file data to upload is up to you.

     

    For JavaScript, we recommend using the official Dropbox API v2 JavaScript SDK. That SDK has a corresponding filesUpload method. You can find an example of using it here. That example gets the file data to upload from a file input field in an HTML form, for instance, not directly from a local filesystem.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,883 PostsLatest Activity: 14 hours ago
326 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!