Commit 59a54c1d by Dirk Benkert

modified drop zone maxFilesize size to match server configuration

parent 40bfc992
......@@ -5618,6 +5618,7 @@ define('modules/File',['require','jquery','Module','dropzone'],function(require)
Dropzone.options.myAwesomeDropzone = {
// The configuration we've talked about above
autoProcessQueue: false,
maxFilesize: 1024,
uploadMultiple: true,
parallelUploads: 3,
url: jQuery('#uploadForm').attr('action'),
......@@ -5642,6 +5643,7 @@ define('modules/File',['require','jquery','Module','dropzone'],function(require)
// The setting up of the dropzone
init: function() {
var myDropzone = this;
var fileCount = 0;
// First change the button to actually tell Dropzone to process the queue.
jQuery("#submitFile").on("click", function(e) {
......@@ -5649,6 +5651,7 @@ define('modules/File',['require','jquery','Module','dropzone'],function(require)
e.preventDefault();
e.stopPropagation();
myDropzone.processQueue();
fileCount = myDropzone.getQueuedFiles().length;
});
this.on("completemultiple", function(files, response) {
......@@ -5658,7 +5661,7 @@ define('modules/File',['require','jquery','Module','dropzone'],function(require)
myDropzone.processQueue();
} else {
jQuery('#dialog').modal('hide');
window.location.reload();
//window.location.reload();
}
});
this.on("errormultiple", function(files, response) {
......@@ -5674,6 +5677,7 @@ define('modules/File',['require','jquery','Module','dropzone'],function(require)
this.on("sendingmultiple", function(file, xhr, formData) {
// append form fields to FormData()
var params = jQuery("#uploadForm").serializeArray();
params['fileCount'] = fileCount;
jQuery.each(params, function(i, val) {
formData.append(val.name, val.value);
});
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -76,6 +76,7 @@ define(function(require) {
Dropzone.options.myAwesomeDropzone = {
// The configuration we've talked about above
autoProcessQueue: false,
maxFilesize: 1024,
uploadMultiple: true,
parallelUploads: 3,
url: jQuery('#uploadForm').attr('action'),
......@@ -118,7 +119,7 @@ define(function(require) {
myDropzone.processQueue();
} else {
jQuery('#dialog').modal('hide');
window.location.reload();
//window.location.reload();
}
});
this.on("errormultiple", function(files, response) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment