6 $renderer = $DIC->ui()->renderer();
9 if (isset(
$_GET[
'example']) &&
$_GET[
'example'] == 1) {
10 $upload = $DIC->upload();
16 echo json_encode([
'success' =>
true,
'message' =>
'Successfully uploaded file' ]);
19 echo json_encode([
'success' =>
false,
'message' => $e->getMessage() ]);
24 $uploadUrl =
$_SERVER[
'REQUEST_URI'] .
'&example=1';
27 ->standard($uploadUrl)
28 ->withUploadButton(
$factory->button()->standard(
'Upload',
''));
30 return $renderer->render($dropzone);
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']