Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
does anyone know a different method not using task async i want to use void
public async Task Download(string remoteFilePath, string localFilePath) { DropboxClient client2 = new DropboxClient("token"); remoteFilePath = "img2.jpg"; localFilePath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); using (var response = await client2.Files.DownloadAsync(remoteFilePath)) { using (var fileStream = File.Create(localFilePath)) { response.GetContentAsStreamAsync().Result.CopyTo(fileStream); } } }
i got it working
public async void DownloadDB() { try { DropboxClient client2 = new DropboxClient("token"); string file = "/data1.db3"; string folder = @"/data/data/AndroidMaster.AndroidMaster/files/data1.db3"; using (var response = await client2.Files.DownloadAsync(file)) { using (var fileStream = File.Create(folder)) { (await response.GetContentAsStreamAsync()).CopyTo(fileStream); } } } catch (Exception ex) { Console.WriteLine(ex); } }
i got it working
public async void DownloadDB() { try { DropboxClient client2 = new DropboxClient("token"); string file = "/data1.db3"; string folder = @"/data/data/AndroidMaster.AndroidMaster/files/data1.db3"; using (var response = await client2.Files.DownloadAsync(file)) { using (var fileStream = File.Create(folder)) { (await response.GetContentAsStreamAsync()).CopyTo(fileStream); } } } catch (Exception ex) { Console.WriteLine(ex); } }
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.
Sound good? Let's get started.Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!