One month down in 2025: How are your resolutions coming along? Check out how to get back on track 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 Staff
The 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 & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 23 hours ago
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!