19declare(strict_types=1);
43 $this->storage =
$DIC->resourceStorage();
51 $result_array = $this->
upload->getResults();
52 $result = end($result_array);
55 if (!$this->is_chunked) {
56 $identifier = $this->storage->manage()->upload($result, $this->stakeholder)->serialize();
57 $status = HandlerResult::STATUS_OK;
61 $status = HandlerResult::STATUS_FAILED;
66 $status = HandlerResult::STATUS_FAILED;
67 $message = $result->getStatus()->getMessage();
75 if (
null !== (
$id = $this->storage->manage()->find($identifier))) {
76 $this->storage->manage()->remove(
$id, $this->stakeholder);
77 $status = HandlerResult::STATUS_OK;
80 $status = HandlerResult::STATUS_OK;
81 $message =
"file with identifier '$identifier' doesn't exist, nothing to do.";
89 if (
null !== (
$id = $this->storage->manage()->find($identifier))) {
90 $revision = $this->storage->manage()->getCurrentRevision(
$id)->getInformation();
91 $title = $revision->getTitle();
93 $mime = $revision->getMimeType();
95 $title = $mime =
'unknown';
105 foreach ($file_ids as $identifier) {
109 return $info_results;
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Class ilCtrlAwareUploadHandler.
getFileIdentifierParameterName()
@inheritDoc
Class BasicFileInfoResult.
Class BasicHandlerResult.
Class ilCountPDFPagesPreProcessors.
Class ilCtrlAwareStorageUploadHandler.
__construct(protected ResourceStakeholder $stakeholder)
getInfoResult(string $identifier)
getRemoveResult(string $identifier)
getInfoForExistingFiles(array $file_ids)
Interface FileInfoResult.
Interface ResourceStakeholder.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc