GridFieldBulkEditingTools
GridFieldBulkEditingTools copied to clipboard
Add support for multiple 'File' types
Hi there, if you dont have any objections, it would be great to add $uploadField->relationAutoSetting = false in GridFieldBulkUpload->bulkUploadField(). See here: https://github.com/arillo/GridFieldBulkEditingTools/commit/82a6d5d0fd48789f6983e3ea3090011e01d4efde
This solves problems with gridfields using multiple classes and prevent the related File type forced to be 'File' only. In this case silverstripe autodetects the proper class (File or Image, depending on its file extension).
Surely an configurable solution for the behaviour would be nice as well.
Friendly regards, Bumbus
sorry for the long silence.... I guess it could be a default setting... I'll have to see if it's an advantage.
But for now this should be easily setup via setUfConfig()
which let's you define the UploadField
configuration options. Something like $config->getComponentByType('GridFieldBulkUpload')->setUfConfig('relationAutoSetting', false);
I know this is old, but how does this look in the context of SS4 and the master version here? I guess the ufSetup route is still fine?