i have worked on this for quite a while:
async Task Upload()
{
using (DropboxClient dbx = new DropboxClient("mytoken"))
{
string folder = Directory.GetCurrentDirectory();
string file = @\temp.dat;
using (var mem = new MemoryStream(Encoding.UTF8.GetBytes("NotIP.dat")))
{
var updated = await dbx.Files.UploadAsync(folder + @/ + file, WriteMode.Overwrite.Instance, body: mem);
label1.Text = (folder + file + updated.Rev);
}
}
}
i start it with:
var task = Upload();
task.Wait();
it returns:
Inner Exception 1:
ArgumentOutOfRangeException: Value should match pattern '\A(?:(/(.|[\r\n])*)|(ns:[0-9]+(/.*)?))\z'
Please help!