FIX: onBulkUpload should be called before write to allow changing record variables

This commit is contained in:
Tony Air 2022-04-19 14:36:41 +02:00 committed by GitHub
parent c34bba4508
commit f9437870a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -80,9 +80,9 @@ class BulkUploadHandler extends RequestHandler
{
$recordClass = $this->component->getRecordClassName($this->gridField);
$record = $recordClass::create();
$record->write();
$record->extend('onBulkUpload', $this->gridField);
$record->write();
$fileRelationName = $this->component->getFileRelationName($this->gridField);
$record->{"{$fileRelationName}ID"} = $fileID;