Merge pull request #303 from sitelease/onbulkupload-enhancement-new

API Added fileID and record variables to onBulkUpload hook (Revision 2)
This commit is contained in:
Guy Sartorelli 2024-08-20 09:24:34 +12:00 committed by GitHub
commit 4bd3542d0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;