vsd file viewer pub file viewer file lock pdb file viewer wps file viewer icon creator recycle bin icon
Description - File icon giver/getter/whatever
This code uses acts_as_attachment (that`s the attachment.filename) but you can of course Replace It with anything.It gets the file extension then looks up that extension in a dir full of files named extension.pngif none is found, unknown.png is used.