Go to the source code of this file.
◆ base()
Definition at line 2 of file base.php.
3{
5
6
7 if (isset(
$_GET[
'example']) &&
$_GET[
'example'] == 1) {
8 $upload =
$DIC->upload();
9 try {
10 $upload->process();
11
12
13
14 echo json_encode(['success' => true, 'message' => 'Successfully uploaded file']);
15 } catch (Exception $e) {
16
17 echo json_encode(['success' => false, 'message' => $e->getMessage()]);
18 }
20 }
21
22 $uiFactory =
$DIC->ui()->factory();
23 $renderer =
$DIC->ui()->renderer();
24
25 $content = $uiFactory->panel()->standard('Panel', $uiFactory->legacy('Hello World, drag some files over me!'));
26 $uploadUrl =
$_SERVER[
'REQUEST_URI'] .
'&example=1';
27
28 $upload = $uiFactory->dropzone()->file()->wrapper($uploadUrl, $content);
29
30 return $renderer->render($upload);
31}
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
References $_GET, $_SERVER, $DIC, and exit.