Reputation: 518
I have an image field in dataobject with has_one relation. I have set
$imageField->setConfig('allowedMaxFileNumber', 1);
Problem is that I am able to select multiple field. However only one is saving when click on Save button.
Due to multiple image selection throgh "From Computer" or "From Files", User has an impression, that he can upload multiple files. https://i.sstatic.net/5r8d0.png
How can I disable multiple image selection for UploadField.
Upvotes: 1
Views: 379
Reputation: 716
That's a known bug: http://open.silverstripe.org/ticket/8145. For now, I would suggest that you use the setDescription() method to advise your users that only one file is allowed to be selected.
Upvotes: 3