Skip to content
Snippets Groups Projects
Commit e628f2e8 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Tmp folders for file uploads dont use fe user id anymore as a part of the name

parent 37e8a271
No related branches found
Tags 1.6.3
No related merge requests found
......@@ -103,7 +103,7 @@ class JoblistController extends ActionController {
*/
public function applyAction(JobApplication $applyData) {
try {
$this->submitApplicationFiles($GLOBALS['TSFE']->fe_user->id, $applyData);
$this->submitApplicationFiles($applyData);
/** @noinspection PhpMethodParametersCountMismatchInspection */
$mailService = $this->objectManager->get(
......@@ -253,13 +253,13 @@ class JoblistController extends ActionController {
* @throws \Exception
* @throws \InvalidArgumentException
*/
private function submitApplicationFiles($folder, JobApplication $applicationData) {
private function submitApplicationFiles(JobApplication $applicationData) {
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$resourceFactory = $objectManager->get(ResourceFactory::class);
$storage = $resourceFactory->getStorageObject(1);
$newName = date('Ymd-His') . '_' . $applicationData->getFirstName();
$sourceFolder = $storage->getFolder('/Extension/temp/' . $folder);
$sourceFolder = $storage->getFolder('/Extension/temp/' . uniqid('sgjobs-', TRUE));
$subFolders = $storage->getFoldersInFolder($sourceFolder);
$fileNames = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment