Commit 63f4777d authored by Carsten  Rose's avatar Carsten Rose

Umstellung das {{myUpload:F}} gefuellt ist - Code ist buggy - mehrer Advanced...

Umstellung das {{myUpload:F}} gefuellt ist - Code ist buggy - mehrer Advanced Upload funktionieren nicht.
parent ec8598d8
Pipeline #2681 passed with stages
in 2 minutes and 51 seconds
......@@ -1382,6 +1382,7 @@ const UPLOAD_MODE_DELETEOLD_NEW = 'deleteOld+new';
const UPLOAD_DEFAULT_MAX_SIZE = '10M';
const UPLOAD_DEFAULT_MIME_TYPE = 'application/pdf';
const UPLOAD_LOG_PREFIX = 'Upload';
const UPLOAD_SIP_EXT = '_sip';
const MIME_TYPE_SPLIT_CAPABLE = 'application/pdf';
......
......@@ -450,7 +450,7 @@ class Save {
}
$column = $formElement[FE_NAME];
$pathFileName = $this->doUpload($formElement, ($formValues[$column] ?? ''), $sip, $modeUpload);
$pathFileName = $this->doUpload($formElement, ($formValues[$column . UPLOAD_SIP_EXT] ?? ''), $sip, $modeUpload);
if ($modeUpload == UPLOAD_MODE_DELETEOLD && $pathFileName == '') {
$pathFileNameTmp = ''; // see '4'
......
......@@ -313,6 +313,11 @@ class FillStoreForm {
case FE_TYPE_UPLOAD:
Sanitize::checkSipFormat($val);
// Move the sip value to ...UPLOAD_SIP_EXT
$newValues[$formElement[FE_NAME] . UPLOAD_SIP_EXT] = $val;
// Restore the filename of the upload
$arr = $this->store::getVar($val, STORE_EXTRA);
$val = Sanitize::safeFilename($arr[FILES_NAME] ?? '', true);
break;
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment