<?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: How to delete the main file  linked to document (type Picture) via REST API and its thumbnails? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-delete-the-main-file-linked-to-document-type-picture-via/m-p/316939#M3940</link>
    <description>&lt;P&gt;Hi Antonio,&lt;/P&gt;
&lt;P&gt;You can try the following solution on &lt;A href="http://nuxeo.github.io/api-playground/"&gt;API playground&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;POST &amp;lt;Nuxeo URL&amp;gt;/nuxeo/site/automation/Document.RemoveProperty&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;with raw-body:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-json"&gt;{
   "input": "&amp;lt;documentId&amp;gt;",
   "params": {
        "xpath": "files/content"
   }
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Alternatively, you can run the following code using Node.js and &lt;A href="https://doc.nuxeo.com/nxdoc/javascript-client/"&gt;Nuxeo JS Client&lt;/A&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-javascript"&gt;#!/usr/bin/env node
const Nuxeo = require('nuxeo');
const nuxeo = new Nuxeo({
  auth: {
    method: 'basic',
    username: 'Administrator',
    password: 'Administrator'
  }
});

nuxeo.operation('Blob.Remove')
.input('/default-domain/path/to/my/picture')
.execute()
.then(function(res) {
})
.catch(function(error) {
  throw new Error(error);
});
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I tested these two solutions on a Picture document and both worked for me. I hope that helps.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Dec 2016 15:53:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-12-30T15:53:54Z</dc:date>
    <item>
      <title>How to delete the main file  linked to document (type Picture) via REST API and its thumbnails?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-delete-the-main-file-linked-to-document-type-picture-via/m-p/316938#M3939</link>
      <description>&lt;P&gt;How to delete the main file  linked to document (type Picture) via REST API and its thumbnail?&lt;/P&gt;
&lt;P&gt;I want to delete it because I have to change it by onother one through PUT update of content:file&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2016 12:33:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-delete-the-main-file-linked-to-document-type-picture-via/m-p/316938#M3939</guid>
      <dc:creator>Antonio_Pescion</dc:creator>
      <dc:date>2016-12-23T12:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete the main file  linked to document (type Picture) via REST API and its thumbnails?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-delete-the-main-file-linked-to-document-type-picture-via/m-p/316939#M3940</link>
      <description>&lt;P&gt;Hi Antonio,&lt;/P&gt;
&lt;P&gt;You can try the following solution on &lt;A href="http://nuxeo.github.io/api-playground/"&gt;API playground&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;POST &amp;lt;Nuxeo URL&amp;gt;/nuxeo/site/automation/Document.RemoveProperty&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;with raw-body:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-json"&gt;{
   "input": "&amp;lt;documentId&amp;gt;",
   "params": {
        "xpath": "files/content"
   }
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Alternatively, you can run the following code using Node.js and &lt;A href="https://doc.nuxeo.com/nxdoc/javascript-client/"&gt;Nuxeo JS Client&lt;/A&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-javascript"&gt;#!/usr/bin/env node
const Nuxeo = require('nuxeo');
const nuxeo = new Nuxeo({
  auth: {
    method: 'basic',
    username: 'Administrator',
    password: 'Administrator'
  }
});

nuxeo.operation('Blob.Remove')
.input('/default-domain/path/to/my/picture')
.execute()
.then(function(res) {
})
.catch(function(error) {
  throw new Error(error);
});
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I tested these two solutions on a Picture document and both worked for me. I hope that helps.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2016 15:53:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-delete-the-main-file-linked-to-document-type-picture-via/m-p/316939#M3940</guid>
      <dc:creator />
      <dc:date>2016-12-30T15:53:54Z</dc:date>
    </item>
  </channel>
</rss>

