<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: C# API : Unable to find batch with id batchId-xx-xx-xx in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/c-api-unable-to-find-batch-with-id-batchid-xx-xx-xx/m-p/325600#M12601</link>
    <description>&lt;P&gt;I finaly found what was going wrong.&lt;/P&gt;
&lt;P&gt;The uploader was created once at instanciation and it seems that it disappears during the processing of my program.
I guess it's killed for security reason or anything.&lt;/P&gt;
&lt;P&gt;So the answer was :
Create a new uploader each time the ImportFile method is called.&lt;/P&gt;
&lt;P&gt;That's it, thanks for your reflexion.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jun 2018 08:36:33 GMT</pubDate>
    <dc:creator>Romain_Gogdemir</dc:creator>
    <dc:date>2018-06-26T08:36:33Z</dc:date>
    <item>
      <title>C# API : Unable to find batch with id batchId-xx-xx-xx</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/c-api-unable-to-find-batch-with-id-batchid-xx-xx-xx/m-p/325599#M12600</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;At instanciation :
public TransferFactory(Client client){
uploader = client.Uploader().SetChuncked(true).SetChunkSize(1024);
}&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Files import :
public void ImportFile(string[] pathes, Document folder)
{
System.Threading.Tasks.Task.Run(async () =&amp;gt;
{
await uploader.AddFiles(pathes).UploadFiles();
Documents documents = (Documents) await uploader.Operation("FileManager.Import")
.SetContext("currentDocument", folder.Path)
.Execute();
Console.WriteLine("Done.");
}).Wait();
}&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;P&gt;Any help would be welcome,
Thank's in advance !&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 09:27:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/c-api-unable-to-find-batch-with-id-batchid-xx-xx-xx/m-p/325599#M12600</guid>
      <dc:creator>Romain_Gogdemir</dc:creator>
      <dc:date>2018-06-20T09:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: C# API : Unable to find batch with id batchId-xx-xx-xx</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/c-api-unable-to-find-batch-with-id-batchid-xx-xx-xx/m-p/325600#M12601</link>
      <description>&lt;P&gt;I finaly found what was going wrong.&lt;/P&gt;
&lt;P&gt;The uploader was created once at instanciation and it seems that it disappears during the processing of my program.
I guess it's killed for security reason or anything.&lt;/P&gt;
&lt;P&gt;So the answer was :
Create a new uploader each time the ImportFile method is called.&lt;/P&gt;
&lt;P&gt;That's it, thanks for your reflexion.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 08:36:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/c-api-unable-to-find-batch-with-id-batchid-xx-xx-xx/m-p/325600#M12601</guid>
      <dc:creator>Romain_Gogdemir</dc:creator>
      <dc:date>2018-06-26T08:36:33Z</dc:date>
    </item>
  </channel>
</rss>

