1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-10 08:44:46 +02:00
This commit is contained in:
Ryan Cramer
2023-10-06 11:24:14 -04:00
parent 173f1b1b29
commit 6d2c8bf795

View File

@@ -1224,6 +1224,8 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel
$pagefile = $this->processInputAddFile($filename);
if($pagefile && isset($originalFilenames[$filename]) && $originalFilenames[$filename] != $filename) {
$pagefile->filedata('uploadName', $originalFilenames[$filename]);
} else if($pagefile->filedata('uploadName')) {
$pagefile->filedata('uploadName', ''); // clear out previous
}
$changed = true;
}