<?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: upload files in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/upload-files/m-p/315532#M2533</link>
    <description>&lt;P&gt;[Blob.AttachOnDocument](http&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jun 2017 09:03:37 GMT</pubDate>
    <dc:creator>Kevin_Leturc</dc:creator>
    <dc:date>2017-06-07T09:03:37Z</dc:date>
    <item>
      <title>upload files</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/upload-files/m-p/315528#M2529</link>
      <description>&lt;P&gt;I am uploading some files in a tree structure, I need to verify if the file already exists in the same folder.&lt;/P&gt;
&lt;P&gt;If it is the same file (with the same content) then do nothing.&lt;/P&gt;
&lt;P&gt;If it is a different file then save a new version.&lt;/P&gt;
&lt;P&gt;How can I compare those files?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Blobs inputBlobs = new Blobs();
inputBlobs.add(file1);
inputBlobs.add(file2);
inputBlobs.add(file3);

nuxeoClient.automation().newRequest("Blob.AttachOnDocument").param("xpath", "files:files").param("document", doc).input(inputBlobs).execute();
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Jun 2017 17:50:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/upload-files/m-p/315528#M2529</guid>
      <dc:creator>Ana_Paula_Lopes</dc:creator>
      <dc:date>2017-06-06T17:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: upload files</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/upload-files/m-p/315529#M2530</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;There's no way to do that in Nuxeo. By default the blob is always marked as different when you attach a blob to a document.
Indeed, it's costly to check the blob content for each update as blobs can be big, stored somewhere else...&lt;/P&gt;
&lt;P&gt;You still can create your own operation to check blob content and then execute your logic (nothing to do or create a version).
You can find how to create an operation &lt;A href="https://doc.nuxeo.com/nxdoc/contributing-an-operation/"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 17:57:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/upload-files/m-p/315529#M2530</guid>
      <dc:creator>Kevin_Leturc</dc:creator>
      <dc:date>2017-06-06T17:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: upload files</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/upload-files/m-p/315530#M2531</link>
      <description>&lt;P&gt;But does it save a new one even if it has the same name?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 18:07:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/upload-files/m-p/315530#M2531</guid>
      <dc:creator>Ana_Paula_Lopes</dc:creator>
      <dc:date>2017-06-06T18:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: upload files</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/upload-files/m-p/315531#M2532</link>
      <description>&lt;P&gt;I say this because I'm doing tests and he's saving the same file several times (each time I repeat the test)&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 18:10:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/upload-files/m-p/315531#M2532</guid>
      <dc:creator>Ana_Paula_Lopes</dc:creator>
      <dc:date>2017-06-06T18:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: upload files</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/upload-files/m-p/315532#M2533</link>
      <description>&lt;P&gt;[Blob.AttachOnDocument](http&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2017 09:03:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/upload-files/m-p/315532#M2533</guid>
      <dc:creator>Kevin_Leturc</dc:creator>
      <dc:date>2017-06-07T09:03:37Z</dc:date>
    </item>
  </channel>
</rss>

