diff --git a/wire/modules/Inputfield/InputfieldFile/InputfieldFile.module b/wire/modules/Inputfield/InputfieldFile/InputfieldFile.module index a5053a79..080aeb70 100644 --- a/wire/modules/Inputfield/InputfieldFile/InputfieldFile.module +++ b/wire/modules/Inputfield/InputfieldFile/InputfieldFile.module @@ -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; }