How to restrict file types when I use the Media Library Picker Field?

Topics: Customizing Orchard
Nov 25, 2014 at 4:25 AM
In my content type, I hope users can only select a .zip or .7z file. What can I do?
Thanks for any answer.
Coordinator
Dec 10, 2014 at 2:45 AM
Go to content definitions, edit your type, deploy the configuration section for your field. It's in there.
Dec 15, 2014 at 3:10 AM
BertrandLeRoy wrote:
Go to content definitions, edit your type, deploy the configuration section for your field. It's in there.
Thanks BertrandLeRoy. I found the Media Library Picker Field has a Content Types and Parts configuration. Do you mean this one? What should I do next? I can't find any option about file types.
Coordinator
Dec 15, 2014 at 7:59 PM
My bad, I thought we had that setting, but surprisingly we don't.
Dec 16, 2014 at 1:50 AM
Edited Dec 16, 2014 at 1:50 AM
Thank you all the same.
Dec 16, 2014 at 2:01 AM
Image and Document are both Content Types in the Media Library. So I think I can set Image at Content Types and Parts to restrict only image files can be select. But I tried that, it doesn't work.
Is there a bug or I do something wrong?
Coordinator
Dec 28, 2014 at 2:50 AM
How does it not work?
Dec 29, 2014 at 1:26 AM
BertrandLeRoy wrote:
How does it not work?
Sorry I don't know. I tried on 1.x, I set Image at Content Types and Parts, but I can select any files also.
Dec 29, 2014 at 2:46 PM
It never worked, that field appears to be just a placeholder for something that never made it into the code as I can't find any implementation for it anywhere. https://orchard.codeplex.com/workitem/21051