diff options
author | zotlabs <mike@macgirvin.com> | 2017-11-28 17:37:18 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-11-28 17:37:18 -0800 |
commit | 76703dee8481075a44b254a548bb29b49530d0ad (patch) | |
tree | b357716a3b0d1dc39b3855fe1839dbf03aa4ba7a /view/js | |
parent | df45c13f622d01241ac96b2f16cb964ba688d72c (diff) | |
download | volse-hubzilla-76703dee8481075a44b254a548bb29b49530d0ad.tar.gz volse-hubzilla-76703dee8481075a44b254a548bb29b49530d0ad.tar.bz2 volse-hubzilla-76703dee8481075a44b254a548bb29b49530d0ad.zip |
more chunk work
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/mod_cloud.js | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js index 32aae2029..25f40e5a5 100644 --- a/view/js/mod_cloud.js +++ b/view/js/mod_cloud.js @@ -18,26 +18,28 @@ function UploadInit() { var submit = $("#upload-submit"); - $('#invisible-cloud-file-upload').fileupload({ + $('#files-upload').fileupload({ url: 'file_upload', dataType: 'json', - // dropZone: $('#profile-jot-text'), - maxChunkSize: 4 * 1024 * 1024, + dropZone: filedrag, + maxChunkSize: 100000, // 4 * 1024 * 1024, + add: function(e,data) { $('#profile-rotator').show(); data.submit(); }, - done: function(e,data) { - addeditortext(data.result.message); - $('#jot-media').val($('#jot-media').val() + data.result.message); - }, - stop: function(e,data) { - preview_post(); - $('#profile-rotator').hide(); - }, + +// done: function(e,data) { +// addeditortext(data.result.message); +// $('#jot-media').val($('#jot-media').val() + data.result.message); +// }, +// stop: function(e,data) { +// preview_post(); +// $('#profile-rotator').hide(); +// }, }); - $('#files-upload').click(function(event) { event.preventDefault(); $('#invisible-cloud-file-upload').trigger('click'); return false;}); +// $('#files-upload').click(function(event) { event.preventDefault(); $('#invisible-cloud-file-upload').trigger('click'); return false;}); @@ -185,6 +187,8 @@ function getIconFromType(type) { // upload files function UploadFile(file, idx) { + return; + window.filesToUpload = window.filesToUpload + 1; var xhr = new XMLHttpRequest(); @@ -229,15 +233,15 @@ function UploadFile(file, idx) { }); // POST to the entire cloud path - xhr.open('post', 'file_upload', true); +// xhr.open('post', 'file_upload', true); - var formfields = $("#ajax-upload-files").serializeArray(); +// var formfields = $("#ajax-upload-files").serializeArray(); - var data = new FormData(); - $.each(formfields, function(i, field) { - data.append(field.name, field.value); - }); - data.append('userfile', file); +// var data = new FormData(); +// $.each(formfields, function(i, field) { +// data.append(field.name, field.value); +// }); +// data.append('userfile', file); - xhr.send(data); +// xhr.send(data); } |