On Tue, 9 Oct 2001, Loren Stafford wrote:
So I see no chance to create a product like DocumentLibrary using content/mime types. The only way to get the correct 'mapping' is to use the file extensions ?!?
Am I right with that? Please comment.
No. I think 'kosh' in another post in this thread said right:
"You really need something to analyze the document and tell what kind of item it is."
Neither browser-reported mime types (which, on Windows, are based on extensions) nor extensions themselves are reliable. Extensions might be more reliable in your environment. An occasional inconsistency may or may not be a serious problem for you and your users. I just wait until someone complains about not being able to launch the right application to read a document, then I fix it manually.
If an occasional inconsistency is not tolerable, you might want to write code for Zope that tries to be more precise. It might compare extension to mime-type and report inconsistencies. Or it might examine file content (good luck!) and set mime-type accordingly. If you do so, please tell us what you come up with.
My problem is that I am starting to see a lot more rtf and plain text files with .doc extensions. People say they want things as word documents and if you give them something.txt or .rtf they freak out. However if you give it a .doc extension word will open it. However this seems like a good way to break various word processing programs. Extensions are a hack and they need to be completely eliminate.