Switch to unified view
a/Allura/allura/controllers/attachments.py | b/Allura/allura/controllers/attachments.py | ||
---|---|---|---|
... |
... |
||
63 | self.thumbnail.delete() |
63 | self.thumbnail.delete() |
64 | except exc.HTTPNotFound: |
64 | except exc.HTTPNotFound: |
65 | pass |
65 | pass |
66 | redirect(request.referer) |
66 | redirect(request.referer) |
67 | embed=False |
67 | embed=False |
68 | if self.attachment.content_type and 'image/' in self.attachment.content_type:
|
68 | if self.attachment.content_type and self.attachment.content_type.startswith('image/'):
|
69 | embed = True |
69 | embed = True |
70 | return self.attachment.serve(embed=embed) |
70 | return self.attachment.serve(embed=embed) |
71 | 71 | ||
72 | @expose() |
72 | @expose() |
73 | def thumb(self): |
73 | def thumb(self): |