GridFieldBulkEditingTools icon indicating copy to clipboard operation
GridFieldBulkEditingTools copied to clipboard

Add support for multiple 'File' types

Open bumbus opened this issue 9 years ago • 2 comments

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

bumbus avatar Oct 21 '15 14:10 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);

colymba avatar Apr 04 '16 13:04 colymba

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?

colymba avatar Mar 06 '18 16:03 colymba