<?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: Limit upload size when creating a document in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/limit-upload-size-when-creating-a-document/m-p/326942#M13943</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;So as far as I know and from reading other similar posts, there isn't an inherit means of limiting uploaded files. However this might be possible to achieve via automation chain.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;First create an automation chain in studio&lt;/LI&gt;
&lt;LI&gt;Fetch the input document&lt;/LI&gt;
&lt;LI&gt;Set a variable to get the value from property "file:content" (assuming you are using this field to upload the binary)&lt;/LI&gt;
&lt;LI&gt;Use RunScript operator to use javascript, to take Blob from the variable, and checking its size with Blob.length (will return length in bytes)&lt;/LI&gt;
&lt;LI&gt;Have it where if the length is more than a certain value, set the property "file:content" to be null.&lt;/LI&gt;
&lt;LI&gt;Set a UI alert operator to notify user the file is too big.&lt;/LI&gt;
&lt;LI&gt;Make sure to create an event handler (before document modification) and assign your automation chain to it&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This is a very broad solution I know, but I've yet to do this myself. This is just a general idea of what I might do in this situation, so feel free to take this with a grain of salt.&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jun 2019 01:00:22 GMT</pubDate>
    <dc:creator>Peter_Tucker</dc:creator>
    <dc:date>2019-06-15T01:00:22Z</dc:date>
    <item>
      <title>Limit upload size when creating a document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/limit-upload-size-when-creating-a-document/m-p/326941#M13942</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I'm trying to limit the upload size to 1GB in Nuxeo. Can someone of you explain how can I do that from Studio. It would be perfect also to be able to show a message when the file is bigger than 1GB saying that the file is not accepted because is bigger than 1GB.&lt;/P&gt;
&lt;P&gt;I have no experience at all with Nuxeo Studio so please be nice &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; and explicitly as much as possible.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 07:56:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/limit-upload-size-when-creating-a-document/m-p/326941#M13942</guid>
      <dc:creator>Eugen_Duta</dc:creator>
      <dc:date>2019-03-04T07:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Limit upload size when creating a document</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/limit-upload-size-when-creating-a-document/m-p/326942#M13943</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;So as far as I know and from reading other similar posts, there isn't an inherit means of limiting uploaded files. However this might be possible to achieve via automation chain.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;First create an automation chain in studio&lt;/LI&gt;
&lt;LI&gt;Fetch the input document&lt;/LI&gt;
&lt;LI&gt;Set a variable to get the value from property "file:content" (assuming you are using this field to upload the binary)&lt;/LI&gt;
&lt;LI&gt;Use RunScript operator to use javascript, to take Blob from the variable, and checking its size with Blob.length (will return length in bytes)&lt;/LI&gt;
&lt;LI&gt;Have it where if the length is more than a certain value, set the property "file:content" to be null.&lt;/LI&gt;
&lt;LI&gt;Set a UI alert operator to notify user the file is too big.&lt;/LI&gt;
&lt;LI&gt;Make sure to create an event handler (before document modification) and assign your automation chain to it&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This is a very broad solution I know, but I've yet to do this myself. This is just a general idea of what I might do in this situation, so feel free to take this with a grain of salt.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2019 01:00:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/limit-upload-size-when-creating-a-document/m-p/326942#M13943</guid>
      <dc:creator>Peter_Tucker</dc:creator>
      <dc:date>2019-06-15T01:00:22Z</dc:date>
    </item>
  </channel>
</rss>

