Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
grrmisfit
7 years agoNew member | Level 2
how to choose save location on downloadasync
seen the tutorial using dbx.Files.DownloadAsync(folder + "/" + file) but is there a way to specify saved file location? using c#
Greg-DB
Dropbox Community Moderator
7 years agoThe DownloadAsync method offers a way to download files from Dropbox, but it does not save the file to the local filesystem for you. It returns an IDownloadResponse which has a few options to accessing the file data. Specifically, you can get the data as a byte array, stream, or string. Please refer to the documentation for more information on those.
There are a few examples of using these at the following links:
- https://github.com/dropbox/dropbox-sdk-dotnet/blob/d0b609bf7ca97051eb91f3802b49931389ba7404/dropbox-sdk-dotnet/Examples/UniversalDemo/UniversalDemo/UniversalDemo.Shared/ViewModel/AppImage.cs#L73
- https://github.com/dropbox/dropbox-sdk-dotnet/blob/d0b609bf7ca97051eb91f3802b49931389ba7404/dropbox-sdk-dotnet/Examples/SimpleBlogDemo/Controllers/EditController.cs#L50
- https://github.com/dropbox/dropbox-sdk-dotnet/blob/d0b609bf7ca97051eb91f3802b49931389ba7404/dropbox-sdk-dotnet/Examples/SimpleBlogDemo/Helpers/BlogHelpers.cs#L45
- https://github.com/dropbox/dropbox-sdk-dotnet/blob/b8f5c751f9df6765f4e2bbb98b39bc6bde5cfadc/dropbox-sdk-dotnet/Examples/SimpleTest/Program.cs#L407
Exactly what you do with the data is up to you. E.g., you can save it to a local file if you wish, using the .NET File API, for instance.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!