Continued work on new upload system

This commit is contained in:
xevidos 2019-11-23 23:39:17 -05:00
parent 988dde4a81
commit 0fd4f782ef
2 changed files with 20 additions and 3 deletions

View file

@ -286,8 +286,11 @@ switch( $action ) {
break;
case 'upload':
if( ! isset( $_POST["blob"] ) ) {
echo var_dump( $_GET );
echo var_dump( $_POST );
if( ! isset( $_POST["data"] ) ) {
$response["status"] = "error";
$response["data"] = array(
@ -296,7 +299,7 @@ switch( $action ) {
exit( json_encode( $response ) );
}
$blob = $_POST["blob"];
$blob = $_POST["data"];
$response = $Filemanager->upload( $path, $blob );
break;

View file

@ -1658,7 +1658,21 @@
upload_blob: async function( blob, path ) {
let _this = codiad.filemanager;
let form = new FormData();
form.append( 'path', path );
form.append( 'data', blob );
$.ajax({
type: 'POST',
url: _this.controller + '?action=upload',
data: form,
processData: false,
contentType: false,
}).done( function( data ) {
console.log( data );
});
},
upload_blobs: function( file, path ) {