U4-5303 - Media Picker in RTE only allows selection of images not PDFs

Created by Sebastiaan Janssen 01 Aug 2014, 10:47:40 Updated by Shannon Deminick 31 Mar 2016, 10:03:49

Relates to: U4-4609

See U4-4609 - This was fixed for the regular media picker datatype but not for the RTE one.

Workaround is to edit ~\Umbraco\Views\common\dialogs\mediapicker.html and change:

images-only="{{onlyImages}}"

to an empty value:

images-only=""

In order for the fix to be applied you might have to change the version number in ClientDependency.config (just any number other than the current one) and do a thorough clearing of your browser cache.

Comments

Shannon Deminick 06 Aug 2014, 17:26:51

The media picker in the RTE is used to show images inline though, for PDFs or files, wouldn't that just be a link? There is no image to render for such things.


Sebastiaan Janssen 07 Aug 2014, 12:41:51

Ha! yeah I totally didn't think of that, if you need to link to a PDF you use the Insert/Edit Link button.


Eric Schrepel 29 Mar 2016, 19:06:03

We're on 7.4.1, tried the steps above, and still getting the red error message "(Only allowed file types are: ".jpeg..jpg...")" when trying to upload a PDF using the Media Picker or Legacy Media Picker field types. We can drag PDFs into the Media folder just fine, but can't upload via Media Picker.


Shannon Deminick 30 Mar 2016, 07:31:27

@Eric.Schrepel if you can replicate with 7.4.2 and have steps to reproduce please create a new issue with these details.


Eric Schrepel 30 Mar 2016, 20:52:32

#Just did a NuGet upgrade on our dev server to go from 7.4.1 to 7.4.2 (upgraded fine). #Clicked an existing content node which has a new Media Picker datatype in it (I created a new datatype just to ensure it wasn't an issue of converting a Legacy Media Picker to regular Media Picker). #Clicked the [ + ] icon to bring up the Select media dialog. #Clicked upload then chose a PDF file, which returned the error {{"Only allowed file types are: .jpeg,.jpg..."}}. Same issue happens when dragging a PDF file there.

Also followed the steps of editing the images-only variable as described above, changing the version number in clientdependency.config, and even using an entirely different browser (which I never do Umbraco stuff in) to ensure a clean cache, same error.

Also happens for any newly-created content nodes (was just seeing if there was a difference between existing and new content, didn't figure that mattered).

I think before 7.4.1 this all worked fine, you could choose either images or PDFs (or Office files, whatever) using the Media Picker tool.

Any logs or anything that would be useful, I can provide. For now, I'm telling our users to drag non-image media files into the Media area then linking to them, but they definitely got used to the convenience of using Media Picker to do the same.


Shannon Deminick 31 Mar 2016, 10:03:49

@Eric.Schrepel are you able to create a new issue with these details please? Once an issue is closed and tagged for release in a version it cannot be re-opened.


Priority: Normal

Type: Bug

State: Closed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.1.4

Due in version:

Sprint:

Story Points:

Cycle: