aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-28 14:30:46 -0800
committerzotlabs <mike@macgirvin.com>2017-11-28 14:30:46 -0800
commitdf45c13f622d01241ac96b2f16cb964ba688d72c (patch)
treebe86f5ce8702a84c416b57d077b533f3374e0c59 /view/js
parent455720ae938126d9a0d3c728beb0a7ba3268a4d0 (diff)
downloadvolse-hubzilla-df45c13f622d01241ac96b2f16cb964ba688d72c.tar.gz
volse-hubzilla-df45c13f622d01241ac96b2f16cb964ba688d72c.tar.bz2
volse-hubzilla-df45c13f622d01241ac96b2f16cb964ba688d72c.zip
first integration attempt with /cloud and blueimp uploader
Diffstat (limited to 'view/js')
-rw-r--r--view/js/mod_cloud.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js
index 8af90863e..32aae2029 100644
--- a/view/js/mod_cloud.js
+++ b/view/js/mod_cloud.js
@@ -17,6 +17,33 @@ function UploadInit() {
var filedrag = $("#cloud-drag-area");
var submit = $("#upload-submit");
+
+ $('#invisible-cloud-file-upload').fileupload({
+ url: 'file_upload',
+ dataType: 'json',
+ // dropZone: $('#profile-jot-text'),
+ maxChunkSize: 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();
+ },
+ });
+
+ $('#files-upload').click(function(event) { event.preventDefault(); $('#invisible-cloud-file-upload').trigger('click'); return false;});
+
+
+
+
+
+
// is XHR2 available?
var xhr = new XMLHttpRequest();
if (xhr.upload) {