20 use TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException;
71 parent::__construct();
87 if (!$this->returnUrl) {
89 . TYPO3_mainDir . BackendUtility::getModuleUrl(
'file_list')
90 .
'&id=' . rawurlencode($this->target);
95 ->retrieveFileOrFolderObject($this->target);
97 if ($this->folderObject->getStorage()->getUid() === 0) {
99 'You are not allowed to access folders outside your storages',
105 if (!$this->folderObject) {
107 $message = $this->
getLanguageService()->sL(
'LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir',
true);
108 throw new \RuntimeException(
$title .
': ' . $message, 1294586843);
112 $this->moduleTemplate->getPageRenderer()->loadRequireJsModule(
'TYPO3/CMS/Backend/ClickMenu');
116 'combined_identifier' => $this->folderObject->getCombinedIdentifier(),
118 $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($pathInfo);
131 $this->moduleTemplate->setTitle(
$lang->sL(
'LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle'));
133 $pageContent =
'<form action="'
134 . htmlspecialchars(BackendUtility::getModuleUrl(
'tce_file'))
135 .
'" method="post" id="FileUploadController" name="editform" enctype="multipart/form-data">';
137 $pageContent .=
'<h1>' .
$lang->sL(
'LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle') .
'</h1>';
141 $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
144 $cshButton = $buttonBar->makeHelpButton()
145 ->setModuleName(
'xMOD_csh_corebe')
146 ->setFieldName(
'file_upload');
147 $buttonBar->addButton($cshButton);
150 if ($this->returnUrl) {
151 $backButton = $buttonBar->makeLinkButton()
153 ->setTitle(
$lang->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.goBack',
true))
154 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
'actions-view-go-back',
Icon::SIZE_SMALL));
155 $buttonBar->addButton($backButton);
158 $pageContent .=
'</form>';
159 $this->content .=
'<div>' . $pageContent .
'</div>';
160 $this->moduleTemplate->setContent($this->content);
172 <div id="c-override">
173 <p><label for="overwriteExistingFiles"><input type="checkbox" class="checkbox" name="overwriteExistingFiles" id="overwriteExistingFiles" value="replace" /> ' . $this->
getLanguageService()->getLL(
'overwriteExistingFiles', 1) .
'</label></p>
184 <input type="file" multiple="multiple" name="upload_1[]" />
185 <input type="hidden" name="file[upload][1][target]" value="' . htmlspecialchars($this->folderObject->getCombinedIdentifier()) .
'" />
186 <input type="hidden" name="file[upload][1][data]" value="1" /><br />
194 <input type="hidden" name="redirect" value="' . $this->returnUrl .
'" /><br />
195 <input class="btn btn-default" type="submit" value="' . $this->
getLanguageService()->sL(
'LLL:EXT:lang/locallang_core.xlf:file_upload.php.submit',
true) .
'" />
211 $response->
getBody()->write($this->moduleTemplate->renderContent());