Re: [Zope-dev] How Medusa handles file extensions
Chimezie Thomas-Ogbuji asked:
Does any one know how the Medusa FTPServer determines which Zope Object/Product to instanciate based on the file extension of a newly created file? For instance if I create a .dtml file, a DTMLMethod is created, if I create a .gif file a Image is created, and any unrecognized extension is instanciated as a File object. I'm trying to capture files with .xml extensions so they are instanciated as XMLDocuments
$ZOPE_HOME/lib/python/OFS/ObjectManager.py contains a helper class, PUTer, which makes this choice. Unfortunately, it doesn't have a hook to allow installation of additional filetype mappings, so I don't see an easy fix. Refactoring time, anyone? Tres -- ========================================================== Tres Seaver tseaver@digicool.com Digital Creations "Zope Dealers" http://www.zope.org
participants (1)
-
Tres Seaver