diff --git a/Classes/Controller/JoblistController.php b/Classes/Controller/JoblistController.php index 6c0025a096c255ba7daef8d4cf6b05f26e3e7c7d..3d14a941be2a5097edcacd2da06e47a44a026cbb 100644 --- a/Classes/Controller/JoblistController.php +++ b/Classes/Controller/JoblistController.php @@ -189,6 +189,25 @@ class JoblistController extends ActionController { } } + /** + * Make sure the upload folder & upload temp folder exists + * + * @return void + * @throws ExistingTargetFolderException + * @throws InsufficientFolderAccessPermissionsException + * @throws InsufficientFolderWritePermissionsException + */ + public function initializeAction(): void { + $storage = $this->fileAndFolderService->getStorage(); + if (!$storage->hasFolder($this->jobFolderPath)) { + $storage->createFolder($this->jobFolderPath); + } + $tempFolderPath = $this->jobFolderPath . DIRECTORY_SEPARATOR . UploadController::JOB_APPLICATION_TEMP_FOLDER; + if (!$storage->hasFolder($tempFolderPath)) { + $storage->createFolder($tempFolderPath); + } + } + /** * Initialize the indexAction to set the currentPageBrowserPage parameter */