Skip to Content
0
Former Member
Oct 27, 2009 at 04:32 PM

Get Icon based on Mimetype

219 Views

Hi Folks,

I am looking for a standard method to derive the icon name for mimetype to be used with the FileUpload UI Element.

This Fileupload returns the Mimetype, i want to display this to the user in a table, each row of the table should contain the icon for filetype.

Please do not suggest hardcoding or endless IF-ELSEIF statements, beacuase to exhaust all the possible file extension it would take quite a while.

Basically the app will serve as an input point for the user to upload documents into teh backend , and since there are mulitple files, it would be great to show them,(graphically of course) what type of data is present is each file.

PS : something similar was requested for in the WD Java fourm and i think a solution was provided.

[url]/message/648254#648254 [original link is broken];url]

Best Regards,

Gaurav