Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple 'File' types #111

Open
bumbus opened this issue Oct 21, 2015 · 2 comments
Open

Add support for multiple 'File' types #111

bumbus opened this issue Oct 21, 2015 · 2 comments

Comments

@bumbus
Copy link

bumbus commented Oct 21, 2015

Hi there,
if you dont have any objections, it would be great to add $uploadField->relationAutoSetting = false in GridFieldBulkUpload->bulkUploadField(). See here:
arillo@82a6d5d

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 bumbus changed the title Add $uploadField->relationAutoSetting = false in GridFieldBulkUploadpublic->bulkUploadField() Add support for multiple 'File' types Oct 22, 2015
@colymba
Copy link
Owner

colymba commented Apr 4, 2016

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
Copy link
Owner

colymba commented Mar 6, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants