From 60986fef16d811122d4dd13fc8617b45509c2958 Mon Sep 17 00:00:00 2001 From: David Mason Date: Fri, 28 Mar 2014 11:46:07 +1000 Subject: [PATCH] limit individual file size to 200MB --- .../jQuery-File-Upload/9_5_6/js/jquery.fileupload-ui.js | 2 ++ .../main/webapp/resources/jQuery-File-Upload/9_5_6/js/main.js | 1 + .../src/main/webapp/resources/zanata/multi-file-upload.xhtml | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/zanata-war/src/main/webapp/resources/jQuery-File-Upload/9_5_6/js/jquery.fileupload-ui.js b/zanata-war/src/main/webapp/resources/jQuery-File-Upload/9_5_6/js/jquery.fileupload-ui.js index 527f1b1919..a726a75dda 100644 --- a/zanata-war/src/main/webapp/resources/jQuery-File-Upload/9_5_6/js/jquery.fileupload-ui.js +++ b/zanata-war/src/main/webapp/resources/jQuery-File-Upload/9_5_6/js/jquery.fileupload-ui.js @@ -125,6 +125,8 @@ // TODO proper i18n for these strings if (error === 'File type not allowed') { data.files[index].error = '"' + file.name + '" is not a supported file type.' + } else if (error === 'File is too large') { + data.files[index].error = '"' + file.name + '" is too large.' } that._renderError(file).appendTo(options.errorList); } else { diff --git a/zanata-war/src/main/webapp/resources/jQuery-File-Upload/9_5_6/js/main.js b/zanata-war/src/main/webapp/resources/jQuery-File-Upload/9_5_6/js/main.js index 553d8c3c6a..e47286c977 100644 --- a/zanata-war/src/main/webapp/resources/jQuery-File-Upload/9_5_6/js/main.js +++ b/zanata-war/src/main/webapp/resources/jQuery-File-Upload/9_5_6/js/main.js @@ -87,6 +87,7 @@ $(function () { uploadForm.fileupload({ sequentialUploads: true, + maxFileSize: 200*1024*1024, dropZone: dropZone, beforeAdd: (function beforeAdd (e, data) { errorList.empty(); diff --git a/zanata-war/src/main/webapp/resources/zanata/multi-file-upload.xhtml b/zanata-war/src/main/webapp/resources/zanata/multi-file-upload.xhtml index ff751d0b72..3ebbb6549e 100644 --- a/zanata-war/src/main/webapp/resources/zanata/multi-file-upload.xhtml +++ b/zanata-war/src/main/webapp/resources/zanata/multi-file-upload.xhtml @@ -70,7 +70,7 @@ site: http://www.fsf.org.

- Maximum file size is 5mb
+ Maximum file size is 200MB
Accepted: pot, dtd, txt, idml, htm, html, odt, odp, ods, odg