Commit 9d80644b authored by 's avatar

Merged fix for bug 1794

parent 95597292
......@@ -84,7 +84,7 @@
##############################################################################
"""Image object"""
__version__='$Revision: 1.119 $'[11:-2]
__version__='$Revision: 1.120 $'[11:-2]
import Globals, string, struct, content_types
from OFS.content_types import guess_content_type
......@@ -124,7 +124,9 @@ def manage_addFile(self,id,file='',title='',precondition='', content_type='',
# Now we "upload" the data. By doing this in two steps, we
# can use a database trick to make the upload more efficient.
self._getOb(id).manage_upload(file)
if content_type:
self._getOb(id).content_type=content_type
if REQUEST is not None:
REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
......@@ -432,6 +434,8 @@ def manage_addImage(self, id, file, title='', precondition='', content_type='',
# Now we "upload" the data. By doing this in two steps, we
# can use a database trick to make the upload more efficient.
self._getOb(id).manage_upload(file)
if content_type:
self._getOb(id).content_type=content_type
if REQUEST is not None:
try: url=self.DestinationURL()
......
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