19 declare(strict_types=1);
43 $this->temp_system = $DIC->filesystem()->temp();
55 $result_array = $this->
upload->getResults();
56 $result = end($result_array);
62 $status = HandlerResult::STATUS_OK;
66 $status = HandlerResult::STATUS_FAILED;
67 $message = $result->getStatus()->getMessage();
82 HandlerResult::STATUS_OK,
84 "We just don't do anything here." 90 if ($this->temp_system->hasDir($file_name)
91 && ($files = $this->temp_system->listContents($file_name))) {
92 $path = $files[0]->getPath();
95 $mime = $this->temp_system->getMimeType(
$path);
96 $size = intval($this->temp_system->getSize(
$path, DataSize::Byte)->inBytes());
99 $title = $mime =
'unknown';
122 $tempfile_path = uniqid(
'tmp');
123 $this->temp_system->createDir($tempfile_path);
124 $this->temp_system->put(
126 file_get_contents($result->
getPath())
128 return $tempfile_path;
moveUploadedFileToTemp(UploadResult $result)
array $supported_mime_types
const SUPPORTED_IMPORT_MIME_TYPES
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getValidFilename(string $a_filename)
getInfoResult(string $file_name)
__construct()
ilUIDemoFileUploadHandlerGUI constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getFileIdentifierParameterName()
Class BasicHandlerResult.
Interface FileInfoResult.
Class ilCtrlAwareUploadHandler.
getRemoveResult(string $filename)
getInfoForExistingFiles(array $file_names)
__construct(Container $dic, ilPlugin $plugin)
Class BasicFileInfoResult.