diff --git a/wcfsetup/install/files/lib/system/form/builder/field/FileProcessorFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/FileProcessorFormField.class.php index 0e2808100b..2588f18967 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/FileProcessorFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/FileProcessorFormField.class.php @@ -5,6 +5,7 @@ use wcf\data\file\File; use wcf\data\file\FileList; use wcf\data\file\thumbnail\FileThumbnailList; +use wcf\data\IStorableObject; use wcf\system\file\processor\FileProcessor; use wcf\system\file\processor\IFileProcessor; use wcf\system\form\builder\data\processor\CustomFormDataProcessor; @@ -104,6 +105,16 @@ function (IFormDocument $document, array $parameters) { return $this; } + #[\Override] + public function updatedObject(array $data, IStorableObject $object, $loadValues = true) + { + if ($loadValues) { + $this->context['objectID'] = $object->{$object::getDatabaseTableIndexName()}; + } + + return parent::updatedObject($data, $object, $loadValues); + } + public function getFileProcessor(): IFileProcessor { return $this->getObjectType()->getProcessor();