ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
server_side_error.php
Go to the documentation of this file.
1<?php
3{
4 global $DIC;
5 $factory = $DIC->ui()->factory();
6 $renderer = $DIC->ui()->renderer();
7
8 if (isset($_GET['example']) && $_GET['example'] == 4) {
9 // The File-Dropzones will expect a valid json-Status (success true or false).
10 echo json_encode(['success' => false, 'message' => 'Unable to store file on server']);
11 exit(0);
12 }
13
14 $uploadUrl = $_SERVER['REQUEST_URI'] . '&example=4';
15 $dropzone = $factory->dropzone()->file()->standard($uploadUrl)
16 ->withMessage('Drag and drop your files here. Note that any upload will be failing!')
17 ->withUploadButton($factory->button()->standard('Upload', ''));
18 return $renderer->render($dropzone);
19}
$factory
Definition: metadata.php:43
exit
Definition: backend.php:16
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
global $DIC
Definition: saml.php:7
server_side_error()
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']