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 | |
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')
-rw-r--r-- | view/js/mod_cloud.js | 44 | ||||
-rw-r--r-- | view/tpl/cloud_actionspanel.tpl | 2 |
2 files changed, 25 insertions, 21 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); } diff --git a/view/tpl/cloud_actionspanel.tpl b/view/tpl/cloud_actionspanel.tpl index fc3e7f82f..489632a4a 100644 --- a/view/tpl/cloud_actionspanel.tpl +++ b/view/tpl/cloud_actionspanel.tpl @@ -25,7 +25,7 @@ <input type="hidden" name="channick" value="{{$channick}}" /> <input type="hidden" name="return_url" value="{{$return_url}}" /> <label for="files-upload">{{$upload_header}}</label> - <input class="form-group pull-left" id="files-upload" type="file" name="userfile"> + <input class="form-group pull-left" id="files-upload" type="file" multiple name="files"> {{include file="field_checkbox.tpl" field=$notify}} <div class="pull-right btn-group"> <div class="btn-group"> |