make drag/drop work with acl, which bypassed the form

This commit is contained in:
redmatrix 2016-07-24 22:58:26 -07:00
parent 063b4286e7
commit 01338a7610
2 changed files with 4 additions and 2 deletions

View File

@ -10,6 +10,8 @@ class File_upload extends \Zotlabs\Web\Controller {
function post() {
// logger('file upload: ' . print_r($_REQUEST,true));
$channel = (($_REQUEST['channick']) ? get_channel_by_nick($_REQUEST['channick']) : null);
if(! $channel) {

View File

@ -90,9 +90,9 @@ function DragDropUploadFile(file, idx) {
}
});
// 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"));
data.append('file', file);
data.append('userfile', file);
xhr.send(data);
}