mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 09:44:38 +02:00
Fix issue processwire/processwire-issues#1819
This commit is contained in:
@@ -1224,6 +1224,8 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel
|
|||||||
$pagefile = $this->processInputAddFile($filename);
|
$pagefile = $this->processInputAddFile($filename);
|
||||||
if($pagefile && isset($originalFilenames[$filename]) && $originalFilenames[$filename] != $filename) {
|
if($pagefile && isset($originalFilenames[$filename]) && $originalFilenames[$filename] != $filename) {
|
||||||
$pagefile->filedata('uploadName', $originalFilenames[$filename]);
|
$pagefile->filedata('uploadName', $originalFilenames[$filename]);
|
||||||
|
} else if($pagefile->filedata('uploadName')) {
|
||||||
|
$pagefile->filedata('uploadName', ''); // clear out previous
|
||||||
}
|
}
|
||||||
$changed = true;
|
$changed = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user