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: How can I save the file from dropbox chooser to s3 or as a blob?

How can I save the file from dropbox chooser to s3 or as a blob?

IanHuang
New member | Level 2

Hi, 
I am currently working on a dropbox integration and I used the chooser method. After user selected the file they want. 
How can I save the file to a s3 bucket or as a blob. Can we fetch the link from returned file Response directly? Currently 
fetching that url returns nothing. And if its not possible do I need to try and download the file using the http endpoints instead?

Thanks in advance !

3 Replies 3

Здравко
Legendary | Level 20

@IanHuang wrote:

... Can we fetch the link from returned file Response directly? ...


Hi @IanHuang,

Using such a way you always get some link back - even if you don't want.

 


@IanHuang wrote:

... Currently fetching that url returns nothing. ...


There is no way to be nothing! It's another story if what you get is not what you want. You can receive temporary direct link - fetching that link will give you the file content directly. Other option is receiving shared link - by default preview link (i.e. you receive HTML). Like for any other shared link you can transform it to be used for download (dl=0 to dl=1) - keep in mind redirection support needed. Take a look here for an example. 😉

Hope this clarifies matter.

iNeil
Dropbox Engineer

Hi @IanHuang,

 

While implementing the Dropbox Chooser, you can configure the linkType parameter as “direct” which will provide an expiring link to download the contents of the file.

 

Would you be able to provide further information about fetching the URL that returns nothing? If you are having difficulty with the Dropbox Chooser, please provide the steps to reproduce the issue, including relevant code snippet(s).

IanHuang
New member | Level 2

thanks a lot, after talking with the user, it seems that this happens because the document is corrupted, the other file works fine.

Need more support?