From 2d5641834451a01e349b7610fcebfb60876dcc07 Mon Sep 17 00:00:00 2001 From: helmutm Date: Sun, 16 Sep 2007 15:04:06 +0000 Subject: [PATCH] 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 --- pyscript/plot.py | 2 ++ pyscript/rstat.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyscript/plot.py b/pyscript/plot.py index 7794ab6..de45aa0 100644 --- a/pyscript/plot.py +++ b/pyscript/plot.py @@ -73,6 +73,8 @@ class PlotView(object): key = self.traverse_subpath[0] else: 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 self.setHeaders(path) f = open(path, 'rb') diff --git a/pyscript/rstat.py b/pyscript/rstat.py index 09633bc..dfb50aa 100644 --- a/pyscript/rstat.py +++ b/pyscript/rstat.py @@ -71,5 +71,5 @@ class RStat(object): context = self.context fn, robj = gdd(**kw) key = registerImage(fn) - return '%s/@@plot?image=%s' % (absoluteURL(context, request), key) + return '%s/@@plot?image=%s.jpg' % (absoluteURL(context, request), key)