From cce2b08e6bcb16b1c9fde13b2597ce66fc0c45d6 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 30 Nov 2017 15:28:53 -0800 Subject: progress on chunked uploads in /cloud --- view/js/mod_cloud.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'view/js') diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js index e9e8e9241..2215a9df9 100644 --- a/view/js/mod_cloud.js +++ b/view/js/mod_cloud.js @@ -18,20 +18,21 @@ function UploadInit() { var submit = $("#upload-submit"); - $('#files-upload').fileupload({ + $('#invisible-cloud-file-upload').fileupload({ url: 'file_upload', dataType: 'json', dropZone: filedrag, + formData: $('#ajax-upload-files').serializeArray(), maxChunkSize: 100000, // 4 * 1024 * 1024, -// add: function(e,data) { -// data.submit(); -// }, - - submit: function(e,data) { - e.preventDefault(); + add: function(e,data) { + data.submit(); }, +// submit: function(e,data) { +// e.preventDefault(); +// }, + // done: function(e,data) { // addeditortext(data.result.message); // $('#jot-media').val($('#jot-media').val() + data.result.message); @@ -42,7 +43,7 @@ function UploadInit() { // }, }); -// $('#files-upload').click(function(event) { event.preventDefault(); $('#invisible-cloud-file-upload').trigger('click'); return false;}); + $('#upload-submit').click(function(event) { event.preventDefault(); $('#invisible-cloud-file-upload').trigger('click'); return false;}); @@ -190,7 +191,6 @@ function getIconFromType(type) { // upload files function UploadFile(file, idx) { - return; window.filesToUpload = window.filesToUpload + 1; -- cgit v1.2.3