Hey,

(Sorry if there's an issue already around this, I couldn't find anything) So I've been playing with the Media module a lot lately and I've got a field on one of my content types that uses the media browser widget. Some of the testing I've done involves uploading files via the field or admin/content/media and adding it to content via the Media Browser Library (after clicking select media).

I've noticed that only image files that I upload are visible under the library tab, I've tested this with pdf, txt, odt, odp and more but I'm only seeing image files. I'm assuming the files displayed here are related to the Allowed File Extensions setting under admin/config/media/browser but I've got the default extensions (jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp mp3 mov m4v mp4 mpeg avi ogg wmv ico) still in there.

Am I missing something?

Cheers,
Z

CommentFileSizeAuthor
#16 media_wysiwyg_vars.zip1.1 KBParisLiakos
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

acbramley’s picture

Priority: Normal » Major
acbramley’s picture

Title: Media browser library only displays images (png, jpg etc...) » Media browser library won't show document type files (txt, pdf, etc)

Have figured out this is a problem with how the file is being stored. PDF files are being stored with a type "application" which media ignores. Txt files are added with type "text" but there's no option in the field settings to allow text files.

Please help, this is very important!

acbramley’s picture

Title: Media browser library won't show document type files (txt, pdf, etc) » Media browser library doesn't allow "Other" file types even if chosen.
acbramley’s picture

Title: Media browser library doesn't allow "Other" file types even if chosen. » Media browser library doesn't display "Other" file types.

After looking into the media module I see what's happening, but still don't know how to fix it (not sure if it's a bug or a problem with my configuration).

Basically, file types that don't fall under audio, image, or video aren't getting displayed because the field settings on a file/multimedia asset does not provide an option to display these file types. The "other" file type doesn't pick these up as the files are stored in the database with their relevant file types (.txt = "text", .pdf = "application)

acbramley’s picture

So under admin/config/media/file-types there's file types for applications and text but these aren't stored in the media_types table? If they were added then this bug would be fixed as it would provide the relevant tick boxes on the field settings.

davidsanger’s picture

Priority: Major » Critical

this is very important.

Can it be addressed?

I have a client site in production and we are having to hard code workarounds to display download links for files that are already in the Media collection but areinaccessible.

acbramley’s picture

Yes I'd appreciate some traction on this bug. Very important for us too!

robeano’s picture

Priority: Critical » Normal

Views integration will solve this issue: #1224766: Remove default media browser and replace with a default view This issue is a part of the Media sprint which starts tomorrow. Let's leave this ticket open and test it once we have Views integration with the browser.

acbramley’s picture

It can easily be fixed with an update hook to add the extra types that should already be in the media_type table as well. Not really sure why they haven't been added already. I would add myself but there's a bunch of stuff in the table that I'm not sure about (the type_callback_args)

yareckon’s picture

sub

ParisLiakos’s picture

Priority: Normal » Major

subscribing....
Switching to major since this renders media browser gallery unusable for files other than image/video/audio.
Will check if i can help tomorrow

arthurf’s picture

@rootatwc - are you referring to the view based browser or the older one? The older one is being completely removed in the short future.

michaelfavia’s picture

I have uploaded pdfs displaying in "application/multipurpose" in the views library plugin. Tentatively marking this as fixed clsoed unless i misunderstand the issue. Please reopen if thats the case. Trying to get wysiwyg insertion in next.

michaelfavia’s picture

Status: Active » Closed (fixed)

Ugh sorry for the bugspam.

ParisLiakos’s picture

wrong version i guess..anyways i was talking about the 1.x browser.glad that its fixed in the 2.x but sites using 1.x media will have to wait a bit for this to happen.
If i find a way to fix this for 1.x i will reopen this for the fix to be included in 1.x till 2.x is stable+with an upgrade path i guess

ParisLiakos’s picture

FileSize
1.1 KB

k that was fast, i fixed that with james_elliot's patch here http://drupal.org/node/1016376#comment-5015558
Also attached a module that does exactly what the patch does since some people have hard time applying patches.
Just enable it and add Other in the configuration.Then pdf's and any other file will be in the browser again!