cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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: Use javascript to create and write file csv by api

Use javascript to create and write file csv by api

ThaiNguyen
Explorer | Level 4
Go to solution

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.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

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.

ThaiNguyen
Explorer | Level 4
Go to solution

Thank you very much,

I did it

Need more support?