web/views/workflow.py
changeset 9440 6880674c1a26
parent 9383 7b3fa5a7a5a3
parent 9426 8e87f1e18a37
child 10006 8391bf718485
equal deleted inserted replaced
9439:549c999d06d2 9440:6880674c1a26
   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)