<?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: Force upload extension in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322595#M9596</link>
    <description>&lt;P&gt;Thank you very much Mr Gregory,&lt;/P&gt;
&lt;P&gt;I have resolved the problem by adding the parameter &lt;EM&gt;&lt;STRONG&gt;accept&lt;/STRONG&gt;&lt;/EM&gt;  with the wanted extensions to the &lt;STRONG&gt;nuxeo-dropzone&lt;/STRONG&gt; tag in &lt;STRONG&gt;create-layout&lt;/STRONG&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;nuxeo-dropzone role="widget"
                label="[[i18n('file.content')]]"
                name="content"
                document="{{document}}"
                accept=".dwg,.dxf,.dgn"
                message="Upload a CAD document"&amp;gt;&amp;lt;/nuxeo-dropzone&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Wed, 02 Oct 2019 10:46:57 GMT</pubDate>
    <dc:creator>ahmed_chaabane</dc:creator>
    <dc:date>2019-10-02T10:46:57Z</dc:date>
    <item>
      <title>Force upload extension</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322589#M9590</link>
      <description>&lt;P&gt;Hello community !&lt;/P&gt;
&lt;P&gt;I am trying to force an extension while uploading my file on a local document type. I want to know if it is possible. And if yes, where I can write the mime-type wanted ?&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 17:03:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322589#M9590</guid>
      <dc:creator>ahmed_chaabane</dc:creator>
      <dc:date>2019-09-30T17:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Force upload extension</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322590#M9591</link>
      <description>&lt;P&gt;Hello Ahmed,&lt;/P&gt;
&lt;P&gt;Have you tried to run a Document.SetProperty on "file:content": { "mime-type": "XXX" } field and update the mimetype with your value? (For example on the documentCreated event with a filter on your custom doctype?)&lt;/P&gt;
&lt;P&gt;You can also run a new converter through the following extension point: &lt;A href="http://explorer.nuxeo.com/nuxeo/site/distribution/Nuxeo%20Platform%20LTS%202019-10.10/viewExtensionPoint/org.nuxeo.ecm.core.convert.service.ConversionServiceImpl--converter"&gt;http://explorer.nuxeo.com/nuxeo/site/distribution/Nuxeo%20Platform%20LTS%202019-10.10/viewExtensionPoint/org.nuxeo.ecm.core.convert.service.ConversionServiceImpl--converter&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 18:13:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322590#M9591</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2019-09-30T18:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Force upload extension</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322591#M9592</link>
      <description>&lt;P&gt;Hello Mr Gregory,&lt;/P&gt;
&lt;P&gt;Thank you for your answer.
I have tried the first proposition by creating an &lt;STRONG&gt;event handler&lt;/STRONG&gt; where the current document has my local custom document type. And the event handler execute an automation chain that uses Document.SetProperty (as seen in the screenshot)
An error is occuring while uploading my document type exactly in the value: &lt;STRONG&gt;{“mime-type”: “XXX” }&lt;/STRONG&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;org.nuxeo.ecm.automation.OperationException: Only scalar types can be set using update operation
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Automation"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1913i0976FD29C099A727/image-size/large?v=v2&amp;amp;px=999" role="button" title="Automation" alt="Automation" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please tell me if the process is correct.&lt;/P&gt;
&lt;P&gt;Thank you very&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 16:41:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322591#M9592</guid>
      <dc:creator>ahmed_chaabane</dc:creator>
      <dc:date>2019-10-01T16:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Force upload extension</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322592#M9593</link>
      <description>&lt;P&gt;It should be &lt;CODE&gt;XPath&lt;/CODE&gt; : &lt;CODE&gt;file:content/mime-type&lt;/CODE&gt; and with value &lt;CODE&gt;image/vnd.dwg&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 18:53:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322592#M9593</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2019-10-01T18:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Force upload extension</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322593#M9594</link>
      <description>&lt;P&gt;Thank you very much Mr Gregory, the mime-type is set exactly as I want. It would be better for me to block upload event when mime-type is different from the ones wanted. I think that running a script would help me. I don't know only the action that blocks the creation event if conditions are not satisfied.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 07:54:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322593#M9594</guid>
      <dc:creator>ahmed_chaabane</dc:creator>
      <dc:date>2019-10-02T07:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Force upload extension</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322594#M9595</link>
      <description>&lt;P&gt;If you need to block the upload if the mime-type is not the good one, then I think you should have controls on the UI side, i.e. on your import layout, in the Polymer section.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2019 08:52:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322594#M9595</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2019-10-02T08:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Force upload extension</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322595#M9596</link>
      <description>&lt;P&gt;Thank you very much Mr Gregory,&lt;/P&gt;
&lt;P&gt;I have resolved the problem by adding the parameter &lt;EM&gt;&lt;STRONG&gt;accept&lt;/STRONG&gt;&lt;/EM&gt;  with the wanted extensions to the &lt;STRONG&gt;nuxeo-dropzone&lt;/STRONG&gt; tag in &lt;STRONG&gt;create-layout&lt;/STRONG&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;nuxeo-dropzone role="widget"
                label="[[i18n('file.content')]]"
                name="content"
                document="{{document}}"
                accept=".dwg,.dxf,.dgn"
                message="Upload a CAD document"&amp;gt;&amp;lt;/nuxeo-dropzone&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 02 Oct 2019 10:46:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/force-upload-extension/m-p/322595#M9596</guid>
      <dc:creator>ahmed_chaabane</dc:creator>
      <dc:date>2019-10-02T10:46:57Z</dc:date>
    </item>
  </channel>
</rss>

