We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Continuous I.
11 years agoNew member | Level 1
CSharp SDK dbx.Files.UploadAsync doesn't work
Hi,
I've installed the CSharp DropBox SDK in a Console App (in part of my CI toolchain, although created in Visual Studio 2013 it is sitting in a Xamarin solution that is built using Jenkins on Mac...
Continuous I.
11 years agoNew member | Level 1
Hi Steve, thanks for your tip, I've tried the forward slash but it doesn't work.
The primary call is essentially straight from the CSharp SDK, which is:
using (var dbx = new DropboxClient("My_Key"))
{
await UploadToDropBox(dbx, "/test", "test.txt", "Hello Dropbox"); // tried with /test and just test
}
And the method it calls (exactly from the SDK with a Console.WriteLine(...) removed:
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);
}
}
But, as stated, without results.
Kind regards,
AnthonyAbout Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!