Faithlee,
The issue with a thumbnailed application viewer is not in the path to the file, or its resemblance to an image. The issue is in reading and interpreting an unknown file format so as to render that image. There are literally hundreds of thousands of file formats, many unique to their editor/viewer. Some are so unique as to be the proprietary property of the company that provides the editor or viewer. To give Sesame the ability to preview or thumbnail any file you throw at it, without regard to the format of that file, we would need to include libraries of routines that know how to read, interpret, and draw, virtually every kind of file there is. Even the operating system (I assume Windows of some ilk), needs to use the actual application, or shared library, from the company that provides that format, to render the thumbnails that appear in Windows Explorer. And, with all of Microsoft's resources, many formats are still rendered with generic images, rather than an actual preview.
That being said, you might consider using a set of representational images, rather than thumbnails or previews of that particular documents. For example, you can keep a list of all of the spreadsheet format extensions you intend to support: (.xls, .xlsx, etc..) and keep a static image of a grid or speadsheet. When the user selects a file that has any of the spreadsheet extensions you have in your list, your code displays the spreadsheet static image. You can do the same thing for other document types. That way there is no need to preview (read, imterpret, render, miniaturize) each and every document format you might want to support, and your users get a nice graphical representation of the file.
|