equal
deleted
inserted
replaced
443 __select__ = match_form_params('tmpfile') |
443 __select__ = match_form_params('tmpfile') |
444 content_type = 'image/png' |
444 content_type = 'image/png' |
445 binary = True |
445 binary = True |
446 |
446 |
447 def cell_call(self, row=0, col=0): |
447 def cell_call(self, row=0, col=0): |
448 tmpfile = self._cw.session.data[self._cw.form['tmpfile']] |
448 key = self._cw.form['tmpfile'] |
|
449 if key not in self._cw.session.data: |
|
450 # the temp file is gone and there's nothing |
|
451 # we can do about it |
|
452 # we should probably write it to some well |
|
453 # behaved place and serve it |
|
454 return |
|
455 tmpfile = self._cw.session.data.pop(key) |
449 self.w(open(tmpfile, 'rb').read()) |
456 self.w(open(tmpfile, 'rb').read()) |
450 os.unlink(tmpfile) |
457 os.unlink(tmpfile) |