API Added fileID and record variables to onBulkUpload hook

This commit is contained in:
Benjamin Blake 2024-08-19 13:30:08 -06:00
parent 50e092d283
commit 13809b999a

View File

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