cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

upload file to public file request with javascript

upload file to public file request with javascript

paykoman
Explorer | Level 3
Go to solution

I generated a public file request in Dropbox and would like to write some javascript code to programmatically upload a file which is generated on the flow (e.g. var myJsonString = JSON.stringify(myArray)) to the public folder.

As an example, I created this public folder:

https://www.dropbox.com/request/3gnn9m16eVCwxazuQIOF

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
[Cross-linking for reference: https://stackoverflow.com/questions/50656407/dropbox-upload-file-to-public-file-request-with-javascr... ]

The Dropbox API doesn't offer a way to programmatically upload to file requests, but I'll pass this along as a feature request.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution
[Cross-linking for reference: https://stackoverflow.com/questions/50656407/dropbox-upload-file-to-public-file-request-with-javascr... ]

The Dropbox API doesn't offer a way to programmatically upload to file requests, but I'll pass this along as a feature request.

grokify
New member | Level 2
Go to solution

You can programmatically upload to a file request using the standard Dropbox `/upload` API. I've tested this and it works fine.

 

I've described this on Stack Overflow here:

https://stackoverflow.com/questions/50656407/dropbox-upload-file-to-public-file-request-with-javascr...

Greg-DB
Dropbox Staff
Go to solution

Thanks for sharing that grokify! To highlight one important note from grokify's post, this only works if you have access to the account for the owner of the file request. I.e., this method is for uploading to the same folder that the file request happens to also be configured for (just like you can upload to any folder if you have that access, via an access token). It does not offer a way to upload to any arbitrary file request as another user, like the file request web site allows.

 

Also, be aware that the designated folder for a file request can change at any time, so it would be best to check the folder path for the file request using /2/file_requests/list or /2/file_requests/get.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    grokify New member | Level 2
What do Dropbox user levels mean?