appy.gen: bugfix while searching the catalog based on object state; added XHTML cleanup code; added String.generatePassword; bugfix: mising HTTP header while sending some responses back to Apache (caused a bug in ckeditor image upload); bugfix while importing images via an image resolver (Zope behind a reverse proxy).
This commit is contained in:
parent
d52e601ea8
commit
9b8064b0cd
5 changed files with 26 additions and 8 deletions
|
@ -249,8 +249,12 @@ class ImageImporter(DocImporter):
|
|||
# retrieve the object on which the image is stored and get
|
||||
# the file to download.
|
||||
urlParts = urlparse.urlsplit(at)
|
||||
path = urlParts[2][1:]
|
||||
obj = imageResolver.unrestrictedTraverse(path.split('/')[:-1])
|
||||
path = urlParts[2][1:].split('/')[:-1]
|
||||
try:
|
||||
obj = imageResolver.unrestrictedTraverse(path)
|
||||
except KeyError:
|
||||
# Maybe a rewrite rule as added some prefix to all URLs?
|
||||
obj = imageResolver.unrestrictedTraverse(path[1:])
|
||||
zopeFile = getattr(obj, urlParts[3].split('=')[1])
|
||||
appyFile = FileWrapper(zopeFile)
|
||||
self.format = mimeTypesExts[appyFile.mimeType]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue