Ok, I'm sorry if this question has already been answered. I've searched all the forums and google too. Either the answer is in my face and I refuse to see it, or it's just not an easy thing to do!
I'm creating an web based file transfer system. I'm using a java applet to do the actual uploading, but it doesn't display the directory. I'm using PHP to display the directory.
So the question is, how can I display the icon for each file? Right now, I determine the file type, and then I have a directory full of PNG's (ie. jpg.png, html.png, etc.). Based on the file type, I add ".png" to it, and it displays the icon from my folder.
Is there a preview or generic icon that is embedded into the file, or is there a way to display the icon the client side OS would display for that type of file?
The problem that I have with doing things the way I'm doing them is that I don't want to have to build a library of all the possible icons. It seems like there has to be an easier (or at least an automated) way of doing this.
Thanks in advance for any advice that you can give.
Brian