1

In my field settings for a media based image field, I have this:

enter image description here

When I upload an image and click next I get the following:

enter image description here

both of those types allow image files, but this particular field should only allow items to be classified as images. Why is the setting not being respected?

1

My guess based on my own experience is that the uploaded file shares the same mime type as the publication files configuration, and the system is asking the user which file type to designate. Example, if both types allow for PNGs, it won't be able to determine the file type for you. Try uploading a file who's mimetype isn't shared by others; you won't get that dialog.

| improve this answer | |
  • Then what in the work is that Allowed file types setting for? I want to allow images in both file types, but I don't want the user to have to understand the details of why we have those two file types, I just want them to automatically have the right one assigned by field. – UltraBob Sep 6 '16 at 13:26
  • Because you've uploaded a file, the system sees that multiple file types share the mime type, it's asking for clarification. There isn't a way to automatically determine what designation the file falls under. It is my understanding that the field only stores the data in the end, the widget/upload dialog occurs before that. – Kevin Sep 6 '16 at 13:30
  • Thanks for the information. I'm just not seeing what that field setting is for if not that. – UltraBob Sep 6 '16 at 13:32
  • I've opened an issue about it here: drupal.org/node/2796131 – UltraBob Sep 13 '16 at 1:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.