From 36145c0a2f2355cfbb37508d5e26647d3f045316 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 8 Oct 2017 16:11:59 +1300 Subject: [PATCH] working classic uploader --- static/sdk.js | 6 ++++++ static/widget.html | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/static/sdk.js b/static/sdk.js index af8a5b0..5e0ab69 100644 --- a/static/sdk.js +++ b/static/sdk.js @@ -116,6 +116,12 @@ var contented = (function ($, currentScriptPath) { handleUploadFrom(e.originalEvent.dataTransfer.files); }); + $f.find('.contented-file-upload').on('click', function(e) { + e.preventDefault(); + e.stopPropagation(); + handleUploadFrom($(".contented-file-selector")[0].files); + }); + $("body").append($f); var setProgressCaption = function(message) { diff --git a/static/widget.html b/static/widget.html index f751bc2..ddbacf6 100644 --- a/static/widget.html +++ b/static/widget.html @@ -132,7 +132,8 @@

- + +