We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.
Forum Discussion
Coffeecat
6 years agoHelpful | Level 6
Alternative Async Await for DropboxClient.Files.DownloadAsync
I just started using the Dropbox API and so far I've manage to browse the files list through my code. Unfortunately, the DownloadAsync function provided by Dropbox's tutorial uses Async/Await, which is not available in VS 2010 (what I'm using).
I downloaded and installed Async CTP, it required VS SP1.
I downloaded and installed VS10SP1-KB2736182, it says it does not apply, or is blocked by another condition on your computer. Googled it but got no help I could understand.
Is there another way to implement this code segment without using Async/Await?
Async Sub DownloadFile(Filepath As String) Dim DF = Await DropboxClient.Files.DownloadAsync(Path.GetFileName(FilePath))
File.WriteAllBytes("file.txt", Await DF.GetContentAsByteArrayAsync) End Sub
I've tried reading other threads but they were in C# and Java, I don't have the ability to properly convert them.
[Cross-linking for reference: https://stackoverflow.com/questions/53445693/alternative-async-await-for-dropboxclient-files-downloadasync ]
I see you also posted this on StackOverflow. The comment the user "GSerg" posted there is correct. If you can't or don't want to use the Async methods, you can use the Begin/End methods instead.
Thanks Greg-DB, I upgraded into VS 2017. I realized I could do more with it. Thanks!
- Greg-DBDropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/53445693/alternative-async-await-for-dropboxclient-files-downloadasync ]
I see you also posted this on StackOverflow. The comment the user "GSerg" posted there is correct. If you can't or don't want to use the Async methods, you can use the Begin/End methods instead.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,875 PostsLatest Activity: 5 hours agoIf 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!