make drag/drop work with acl, which bypassed the form
This commit is contained in:
parent
063b4286e7
commit
01338a7610
@ -10,6 +10,8 @@ class File_upload extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
function post() {
|
function post() {
|
||||||
|
|
||||||
|
// logger('file upload: ' . print_r($_REQUEST,true));
|
||||||
|
|
||||||
$channel = (($_REQUEST['channick']) ? get_channel_by_nick($_REQUEST['channick']) : null);
|
$channel = (($_REQUEST['channick']) ? get_channel_by_nick($_REQUEST['channick']) : null);
|
||||||
|
|
||||||
if(! $channel) {
|
if(! $channel) {
|
||||||
|
@ -90,9 +90,9 @@ function DragDropUploadFile(file, idx) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// POST to the entire cloud path
|
// POST to the entire cloud path
|
||||||
xhr.open('post', window.location.pathname, true);
|
xhr.open('post', 'file_upload', true);
|
||||||
|
|
||||||
var data = new FormData(document.getElementById("ajax-upload-files"));
|
var data = new FormData(document.getElementById("ajax-upload-files"));
|
||||||
data.append('file', file);
|
data.append('userfile', file);
|
||||||
xhr.send(data);
|
xhr.send(data);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user