08-02-2017 10:46 AM
Hi, I don't want to allow .exe file to drag and drop by user while edit document. Can any one tell me how to do this.
08-11-2017 01:31 AM
Hi, I have fixed this bug by changing code in jquery.dnd-file-upload.js of nuxeo-platform-webapp-base bundle. In this file I have change function processFileOrFolderEntryAsync() as fillows:
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 && fileOb.size < (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); } }
06-10-2021 12:37 AM
hi santhosh,
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.