add extension to plot link in order to make Flash happy
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2053 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
91edc2b6e8
commit
2d56418344
2 changed files with 3 additions and 1 deletions
|
@ -73,6 +73,8 @@ class PlotView(object):
|
||||||
key = self.traverse_subpath[0]
|
key = self.traverse_subpath[0]
|
||||||
else:
|
else:
|
||||||
key = self.request.form.get('image', 'not_found')
|
key = self.request.form.get('image', 'not_found')
|
||||||
|
if '.' in key: # remove extension possibly added to make Flash happy
|
||||||
|
key = key.split('.', 1)[0]
|
||||||
path = cachedImages[key].path
|
path = cachedImages[key].path
|
||||||
self.setHeaders(path)
|
self.setHeaders(path)
|
||||||
f = open(path, 'rb')
|
f = open(path, 'rb')
|
||||||
|
|
|
@ -71,5 +71,5 @@ class RStat(object):
|
||||||
context = self.context
|
context = self.context
|
||||||
fn, robj = gdd(**kw)
|
fn, robj = gdd(**kw)
|
||||||
key = registerImage(fn)
|
key = registerImage(fn)
|
||||||
return '%s/@@plot?image=%s' % (absoluteURL(context, request), key)
|
return '%s/@@plot?image=%s.jpg' % (absoluteURL(context, request), key)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue