Validation Error after picking PDF using Media Picker Field / Media Browser is geared towards Images, how about non-images, like PDF?

Topics: Administration, General, Troubleshooting
Nov 24, 2011 at 12:54 PM
Edited Nov 24, 2011 at 12:57 PM

The Media Browser is a nice dialog, however it is currently designed just for uploading images.
Although it does support uploading files of a different type, like PDF, there is a little problem: When I pick a PDF, the Width & Height fields remain empty, which cause a Validation Error to occur once I save my Content Item.

To reproduce:

1. Create a new Content Type which has a Media Picker Field
2. Create a new Content Item of the new Content Type and select a PDF file
3. Hit Save and watch it fail.

You can find a screenshot demonstrating the issue here:

Please note that this issue wasn't there before. I assume it happened after upgrading to 1.3, or perhaps it's after upgrading to a newer version of the Media Picker Field, I'm not sure.

Nov 24, 2011 at 1:06 PM

Until Orchard's media support is improved, there are a number of modules that go further. For instance with my Media Garden project you can upload most types of file and they get recognised and handled correctly if you have the right modules installed (e.g. there's a Documents module that supports pdf). Media files get created as content items off the bat so the MediaPickerField is redundant (the idea being instead to use something like Mechanics to define relationships between content and media).

Nov 26, 2011 at 6:12 PM

Hi randompete, thanks for the tip! On next projects I will have a look at the Media Garden project then.

Nov 29, 2011 at 12:38 AM

Can you please file a bug?

Dec 21, 2011 at 8:35 PM

Yo Skywalker, have you filed a bug for this?

Dec 22, 2011 at 1:20 PM

I knew there was something I still had to do... thanks for reminding me!

Just filed it as a bug: