- Timestamp:
- 11 Jan 2015, 22:43:35 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/browser/fileviewlets.py
r12386 r12444 109 109 label = _(u'File') 110 110 title = _(u'Scan') 111 download_name = u'filename.jpg' 111 download_name = None 112 113 @property 114 def download_filename(self): 115 return u"%s.pdf" % self.context.document_id[:9] 112 116 113 117 @property … … 131 135 upload_button =_('Upload selected file') 132 136 delete_button = _('Delete') 137 138 @property 139 def download_filename(self): 140 return u"%s.pdf" % self.context.document_id[:9] 133 141 134 142 @property … … 175 183 """ 176 184 grok.baseclass() 177 grok.name('none.jpg') 178 download_name = u'none.jpg' 185 download_name = None 186 187 @property 188 def download_filename(self): 189 return u"%s.pdf" % self.context.document_id[:9] 179 190 180 191 def render(self): … … 198 209 elif ext == '.tif': 199 210 self.response.setHeader('Content-Type', 'image/tiff') 211 if self.download_filename: 212 self.response.setHeader('Content-Disposition', 213 'attachment; filename="%s' % self.download_filename) 200 214 return image
Note: See TracChangeset for help on using the changeset viewer.