<?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 How to block uploading files of certain mime-types? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-block-uploading-files-of-certain-mime-types/m-p/270391#M223521</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use Alfresco 4.0.4 and 3.4.10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to block files of certain mime-types from being uploaded into Alfresco?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ideally, it'll be very good if it can be easily set in repository properties, content model or something like these. But I don't know if this functionality exists.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As I also understood, this blocking cannot be done with help of content rules… Please correct me if I'm wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And one more possible solution is to implement a custom AMP module which will prevent uploading unnecessary files. Right now I don't also know how to impement it because I don't see how implementing NodeServicePolicies.OnCreateNodePolicy can prevent node creation… Maybe there is another solution not connected with behaviour policies…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, is there &lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt; appropriate solution for this problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Oct 2012 15:15:02 GMT</pubDate>
    <dc:creator>alexsolomatin</dc:creator>
    <dc:date>2012-10-10T15:15:02Z</dc:date>
    <item>
      <title>How to block uploading files of certain mime-types?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-block-uploading-files-of-certain-mime-types/m-p/270391#M223521</link>
      <description>Hi,I use Alfresco 4.0.4 and 3.4.10.Is it possible to block files of certain mime-types from being uploaded into Alfresco?Ideally, it'll be very good if it can be easily set in repository properties, content model or something like these. But I don't know if this functionality exists.As I also unders</description>
      <pubDate>Wed, 10 Oct 2012 15:15:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-block-uploading-files-of-certain-mime-types/m-p/270391#M223521</guid>
      <dc:creator>alexsolomatin</dc:creator>
      <dc:date>2012-10-10T15:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to block uploading files of certain mime-types?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-block-uploading-files-of-certain-mime-types/m-p/270392#M223522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No I don't think there is anything out of the box.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And also mime type detection is done after uploading the content so its too late.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can throw an exception from the onCreate policy.&amp;nbsp;&amp;nbsp; Its not elegant but would prevent certain mimetypes.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or you could have a rule which simply deletes the unwanted content.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or depending upon the interface you may be able to chose files with certain file name patterns.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 16:12:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-block-uploading-files-of-certain-mime-types/m-p/270392#M223522</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2012-10-10T16:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to block uploading files of certain mime-types?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-block-uploading-files-of-certain-mime-types/m-p/270393#M223523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for the response!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 10:19:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-block-uploading-files-of-certain-mime-types/m-p/270393#M223523</guid>
      <dc:creator>alexsolomatin</dc:creator>
      <dc:date>2012-10-11T10:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to block uploading files of certain mime-types?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-block-uploading-files-of-certain-mime-types/m-p/270394#M223524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe it is useful to know that we managed to limit upload file size by overriding &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;org.apache.commons.fileupload.servlet.ServletFileUpload.java&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; and setting the maxFileSize property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the same way I think you can intercept the mimetype of the content coming along with the request and block upload.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It may seem not very elegant, but for our purpose worked fine, since we couldn't find any other workaround&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andrea&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 11:31:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-block-uploading-files-of-certain-mime-types/m-p/270394#M223524</guid>
      <dc:creator>abarisone</dc:creator>
      <dc:date>2012-10-11T11:31:53Z</dc:date>
    </item>
  </channel>
</rss>

