working classic uploader

This commit is contained in:
mappu 2017-10-08 16:11:59 +13:00
parent 6c21e2a7fa
commit 36145c0a2f
2 changed files with 8 additions and 1 deletions

View File

@ -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) {

View File

@ -132,7 +132,8 @@
<div class="contented-upload-if contented-if-file">
<label>Select files to upload <span class="contented-extratext"></span></label><br>
<input name="f" type="file" multiple>
<input class="contented-file-selector" type="file" multiple>
<button class="contented-file-upload">Upload &raquo;</button>
</div>
<div class="contented-upload-if contented-if-paste">