Hi everybody,
I'm having trouble uploading files with the Uploader object.
Here's how I do it :
I have a class dedicated to managing REST operations in which I created the methods.
At instanciation :
public TransferFactory(Client client){
uploader = client.Uploader().SetChuncked(true).SetChunkSize(1024);
}
Files import :
public void ImportFile(string[] pathes, Document folder)
{
System.Threading.Tasks.Task.Run(async () =>
{
await uploader.AddFiles(pathes).UploadFiles();
Documents documents = (Documents) await uploader.Operation("FileManager.Import")
.SetContext("currentDocument", folder.Path)
.Execute();
Console.WriteLine("Done.");
}).Wait();
}
When I need to create a folder, (not described here method) it works well.
But when I need to upload files, I have the error : C# API : Unable to find batch with id batchId-xx-xx-xx
Any help would be welcome,
Thank's in advance !