<?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 restrict drag and drop .exe file in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-restrict-drag-and-drop-exe-file/m-p/323857#M10858</link>
    <description>&lt;P&gt;Hi,
I have fixed this bug by changing code in &lt;STRONG&gt;jquery.dnd-file-upload.js&lt;/STRONG&gt; of &lt;STRONG&gt;nuxeo-platform-webapp-base&lt;/STRONG&gt; bundle. In this file I have change function &lt;STRONG&gt;processFileOrFolderEntryAsync()&lt;/STRONG&gt; as fillows:&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;function processFileOrFolderEntryAsync(fileOb, opts, fileCB, folderCB, transferItem) {
// filter Folders from dropped content
// Folder size is 0 under Win / %4096 under Linux / variable under MacOS
if(fileOb.type =="application/x-ms-dos-executable"){// code added for not to allow .exe files to drag and drop
alert(".exe file not allowed");
cancelUploadIfNoValidFileWasDropped(opts) // code added for not to allow .exe files to drag and drop
}else if (!fileOb.type &amp;amp;&amp;amp; fileOb.size &amp;lt; (4096 * 4 + 1)) {
try {
// need to test the file by reading it ...
var reader = new FileReader();
reader.onerror = function (e) {
folderCB(fileOb, opts, transferItem);
};
reader.onabort = function (e) {
folderCB(fileOb, opts, transferItem);
};
reader.onload = function (e) {
fileCB(fileOb, opts);
};
reader.readAsText(fileOb);
} catch (err) {
folderCB(fileOb, opts, transferItem);
}
} else {
fileCB(fileOb, opts);
}
}&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2017 05:31:11 GMT</pubDate>
    <dc:creator>Santosh_Yadav</dc:creator>
    <dc:date>2017-08-11T05:31:11Z</dc:date>
    <item>
      <title>How to restrict drag and drop .exe file</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-restrict-drag-and-drop-exe-file/m-p/323856#M10857</link>
      <description>&lt;P&gt;Hi,
I don't want to allow &lt;STRONG&gt;.exe&lt;/STRONG&gt; file to drag and drop by user while edit document.
Can any one tell me how to do this.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 14:46:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-restrict-drag-and-drop-exe-file/m-p/323856#M10857</guid>
      <dc:creator>Santosh_Yadav</dc:creator>
      <dc:date>2017-08-02T14:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict drag and drop .exe file</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-restrict-drag-and-drop-exe-file/m-p/323857#M10858</link>
      <description>&lt;P&gt;Hi,
I have fixed this bug by changing code in &lt;STRONG&gt;jquery.dnd-file-upload.js&lt;/STRONG&gt; of &lt;STRONG&gt;nuxeo-platform-webapp-base&lt;/STRONG&gt; bundle. In this file I have change function &lt;STRONG&gt;processFileOrFolderEntryAsync()&lt;/STRONG&gt; as fillows:&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;function processFileOrFolderEntryAsync(fileOb, opts, fileCB, folderCB, transferItem) {
// filter Folders from dropped content
// Folder size is 0 under Win / %4096 under Linux / variable under MacOS
if(fileOb.type =="application/x-ms-dos-executable"){// code added for not to allow .exe files to drag and drop
alert(".exe file not allowed");
cancelUploadIfNoValidFileWasDropped(opts) // code added for not to allow .exe files to drag and drop
}else if (!fileOb.type &amp;amp;&amp;amp; fileOb.size &amp;lt; (4096 * 4 + 1)) {
try {
// need to test the file by reading it ...
var reader = new FileReader();
reader.onerror = function (e) {
folderCB(fileOb, opts, transferItem);
};
reader.onabort = function (e) {
folderCB(fileOb, opts, transferItem);
};
reader.onload = function (e) {
fileCB(fileOb, opts);
};
reader.readAsText(fileOb);
} catch (err) {
folderCB(fileOb, opts, transferItem);
}
} else {
fileCB(fileOb, opts);
}
}&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 05:31:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-restrict-drag-and-drop-exe-file/m-p/323857#M10858</guid>
      <dc:creator>Santosh_Yadav</dc:creator>
      <dc:date>2017-08-11T05:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to restrict drag and drop .exe file</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-restrict-drag-and-drop-exe-file/m-p/323858#M10859</link>
      <description>&lt;P&gt;hi santhosh,&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 04:37:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-restrict-drag-and-drop-exe-file/m-p/323858#M10859</guid>
      <dc:creator>Subash_bharath_</dc:creator>
      <dc:date>2021-06-10T04:37:04Z</dc:date>
    </item>
  </channel>
</rss>

