<?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: Blob.AttachOnDocument Rest API in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/blob-attachondocument-rest-api/m-p/320135#M7136</link>
    <description>&lt;P&gt;Have you tried this? After you have your batch id, replace that below, and of course your own URL.&lt;/P&gt;
&lt;P&gt;Create a new document with the blob:
curl -X POST -d '{"entity-type":"document","name":"TestFile","type":"File","properties":{"file:content":{
"upload-batch": "batchId-yourbatchid","upload-fileId": "0"}}} ' -H "Content-Type:application" -i &lt;A href="http://localhost.com:8080/nuxeo/api/v1/path/default-domain/" target="test_blank"&gt;http://localhost.com:8080/nuxeo/api/v1/path/default-domain/&lt;/A&gt; -u Administrator&lt;/P&gt;
&lt;P&gt;Or update an existing document with the blob:
curl -X PUT -d '{"entity-type":"document","name":"Your Document Name","type":"File","properties":{"file:content":{
"upload-batch": "batchId-yourbatchid","upload-fileId": "0"}}} ' -H "Content-Type:application" -i &lt;A href="http://localhost.com:8080/nuxeo/api/v1/id/854e5731-c792-4a1a-8945-4b310581c9e2" target="test_blank"&gt;http://localhost.com:8080/nuxeo/api/v1/id/854e5731-c792-4a1a-8945-4b310581c9e2&lt;/A&gt; -u Administrator&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2019 19:32:56 GMT</pubDate>
    <dc:creator>LaraGranite_</dc:creator>
    <dc:date>2019-06-12T19:32:56Z</dc:date>
    <item>
      <title>Blob.AttachOnDocument Rest API</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/blob-attachondocument-rest-api/m-p/320134#M7135</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I can't attach blob to a document using REST&amp;nbsp;API. To debug I decided to try with the demo web interface. I also get a 404 error code response.
__com.sun.jersey.api.NotFoundException: null for uri: &lt;A href="http://demo.nuxeo.com/nuxeo/site/automation/batch/execute" target="test_blank"&gt;http://demo.nuxeo.com/nuxeo/site/automation/batch/execute&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Here is the  the curl request :&lt;/P&gt;
&lt;P&gt;curl -X POST 'https://demo.nuxeo.com/nuxeo/site/automation/batch/execute' -H 'Nuxeo-Transaction-Timeout: 3' -H 'X-NXproperties: *' -H 'X-NXRepository: default' -H 'X-NXVoidOperation: false' -H 'content-type: application/json' -d '{"params":{"document":"854e5731-c792-4a1a-8945-4b310581c9e2","save":"true","xpath":"files","operationId":"Blob.AttachOnDocument","batchId":"batchId-ca3b5737-bb41-484a-bd3c-72676f3ddecc"},"context":{}}' -u Administrator:&lt;PASSWORD&gt;&lt;/PASSWORD&gt;&lt;/P&gt;
&lt;P&gt;Any help is welcome ! Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 11:34:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/blob-attachondocument-rest-api/m-p/320134#M7135</guid>
      <dc:creator>Corinne_</dc:creator>
      <dc:date>2019-06-03T11:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Blob.AttachOnDocument Rest API</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/blob-attachondocument-rest-api/m-p/320135#M7136</link>
      <description>&lt;P&gt;Have you tried this? After you have your batch id, replace that below, and of course your own URL.&lt;/P&gt;
&lt;P&gt;Create a new document with the blob:
curl -X POST -d '{"entity-type":"document","name":"TestFile","type":"File","properties":{"file:content":{
"upload-batch": "batchId-yourbatchid","upload-fileId": "0"}}} ' -H "Content-Type:application" -i &lt;A href="http://localhost.com:8080/nuxeo/api/v1/path/default-domain/" target="test_blank"&gt;http://localhost.com:8080/nuxeo/api/v1/path/default-domain/&lt;/A&gt; -u Administrator&lt;/P&gt;
&lt;P&gt;Or update an existing document with the blob:
curl -X PUT -d '{"entity-type":"document","name":"Your Document Name","type":"File","properties":{"file:content":{
"upload-batch": "batchId-yourbatchid","upload-fileId": "0"}}} ' -H "Content-Type:application" -i &lt;A href="http://localhost.com:8080/nuxeo/api/v1/id/854e5731-c792-4a1a-8945-4b310581c9e2" target="test_blank"&gt;http://localhost.com:8080/nuxeo/api/v1/id/854e5731-c792-4a1a-8945-4b310581c9e2&lt;/A&gt; -u Administrator&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 19:32:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/blob-attachondocument-rest-api/m-p/320135#M7136</guid>
      <dc:creator>LaraGranite_</dc:creator>
      <dc:date>2019-06-12T19:32:56Z</dc:date>
    </item>
  </channel>
</rss>

