Commit 35122884 authored by Jim Fulton's avatar Jim Fulton

Made content-type optional on upload.

parent 5e653017
"""Image object"""
__version__='$Revision: 1.37 $'[11:-2]
__version__='$Revision: 1.38 $'[11:-2]
import Globals
from Globals import HTMLFile, MessageDialog
......@@ -119,7 +119,8 @@ class File(Persistent,Implicit,RoleManager,Item_w__name__):
The file or images contents are replaced with the contents of 'file'.
"""
self.content_type=file.headers['content-type']
try: self.content_type=file.headers['content-type']
except KeyError: pass
data=file.read()
self.data=Pdata(data)
self.size=len(data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment