diff --git a/code/GridFieldBulkImageUpload_Request.php b/code/GridFieldBulkImageUpload_Request.php index 32bcec0..2622a90 100644 --- a/code/GridFieldBulkImageUpload_Request.php +++ b/code/GridFieldBulkImageUpload_Request.php @@ -264,6 +264,9 @@ class GridFieldBulkImageUpload_Request extends RequestHandler { $record = Object::create($recordClass); $record->setField($recordForeignKey, $recordForeignID); + // passes the current gridfield-instance to a call-back method on the new object + $record->extend("onBulkImageUpload", $this->gridField); + $record->write(); $upload = new Upload();