2017-06-14 59 views

回答

0

您可以在您的項目安裝Xamarin.Dropbox.Api

enter image description here

然後檢查這裏的文件:tutorial

用於上載的代碼是這樣的:

public async Task Upload(DropboxClient dbx, string folder, string file, string content) 
{ 
    using (var mem = new MemoryStream(Encoding.UTF8.GetBytes(content))) 
    { 
     var updated = await dbx.Files.UploadAsync(
      folder + "/" + file, 
      WriteMode.Overwrite.Instance, 
      body: mem); 
     Console.WriteLine("Saved {0}/{1} rev {2}", folder, file, updated.Rev); 
    } 
} 
相關問題