[Zope] ExtFile Extention Mappings
Stefan H. Holek
stefan at epy.co.at
Sat Apr 9 12:02:53 EDT 2005
Why?
Because one of the main tricks of ExtFile is the ability to have files
and images served statically by Apache, right out of the repository.
Apache determines the mime type to serve from the file extension, ergo
ExtFile has to make sure there is one.
How?
from mimetypes import guess_extension
ext = guess_extension(self.content_type)
If this yields the wrong result perhaps your system's mimetypes table
is messed up? I must admit my use case is images for the most part, and
they work just fine.
If this does not do what you want poke around a bit in Config.py. You
can change almost every aspect of ExtFile's repository handling.
hth,
Stefan
On 8. Apr 2005, at 19:17, Edward Pollard wrote:
> I've done some poking at the source code but don't see why ExtFile is
> doing this or what logic it uses.
--
Software Engineering is Programming when you can't. --E. W. Dykstra
More information about the Zope
mailing list