cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Alternative Async Await for DropboxClient.Files.DownloadAsync

Alternative Async Await for DropboxClient.Files.DownloadAsync

Coffeecat
Helpful | Level 6
Go to solution

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.

2 Accepted Solutions

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

[Cross-linking for reference: https://stackoverflow.com/questions/53445693/alternative-async-await-for-dropboxclient-files-downloa... ]

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. 

View solution in original post

Coffeecat
Helpful | Level 6
Go to solution

Thanks @Greg-DB, I upgraded into VS 2017. I realized I could do more with it. Thanks!

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

[Cross-linking for reference: https://stackoverflow.com/questions/53445693/alternative-async-await-for-dropboxclient-files-downloa... ]

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. 

Coffeecat
Helpful | Level 6
Go to solution

Thanks @Greg-DB, I upgraded into VS 2017. I realized I could do more with it. Thanks!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Coffeecat Helpful | Level 6
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?