Closed (fixed)
Project:
Web File Manager
Version:
5.x-1.5
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2007 at 15:45 UTC
Updated:
10 Jun 2007 at 21:16 UTC
When editing a node and attaching files to the node through webfm the attached files display with appropriate icons. For example a PDF file will display a pdf icon.
However when viewing the node after saving the plane f.gif icon is assigned to all file types including PDF.
Question:
is this a setting I've done wrong?
How can I supply a new icon for a different file type? (example: *.lbxoeb files use lbxoeb.gif)?
Thanks for your input.
Comments
Comment #1
robmilne commentedYou could do the following inside webfm.module:
The problem here is that you may not like the default icons, etc so you could point to another image folder inside /admin/settings/webfm that used that same file names for the gifs. I haven't made this a patch because I think there is probably a more portable and clean way of handling the icon substitutions.
Comment #2
robmilne commentedComment #3
Plecebo commentedI'm having this problem as well. In the WebFM interface I see the appropriate Icon e.g. pdf, word etc (on this page mysite/node/15/edit), but when i view the node normally (mysite/node/15) i only see the f.gif image, not the appropriate icon.
I looked in my webfm.module file and I have nearly exactly the same code as is listed above, the only difference being I have this code:
$rows[] = array(array('data' => $file->fdesc, 'colspan' => '2'));everything else is identical.
Any Ideas?
Comment #4
robmilne commentedArgh! That line was provisional and shouldn't have made it to the release. You can remove it if you don't want to display the file description metadata on alternating table rows. I'll address the image issue for attachments when I next update the dev version.
Comment #5
peterpoe commentedI had the same problem with an mp3 file. I looked at the file metadata information, where the mime filetype was mp3, so I added the following lines to the _webfm_get_icon function:
I also a noticed strange behavior with pdf files: the mime filetype listed is "application/x-filler". How's that?
Comment #6
robmilne commentedI'm not familiar with all the mime extensions and haven't come across "application/x-filler" before. That particular extension may be a result of how the file was uploaded.
The extension handling is a bit ad hoc and not high on my priorities for fixing but I will keep it in mind.
Comment #7
(not verified) commented