You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Coffeecat's avatar
Coffeecat
Helpful | Level 6
7 years ago

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.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 4 days ago
333 Following

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!