Switch to unified view

a/Allura/allura/controllers/attachments.py b/Allura/allura/controllers/attachments.py
...
...
51
        if attachment is None:
51
        if attachment is None:
52
            raise exc.HTTPNotFound
52
            raise exc.HTTPNotFound
53
        return attachment
53
        return attachment
54
        
54
        
55
    @expose()
55
    @expose()
56
    def index(self, delete=False, embed=True, **kw):
56
    def index(self, delete=False, **kw):
57
        if request.method == 'POST':
57
        if request.method == 'POST':
58
            require_access(self.artifact, self.edit_perm)
58
            require_access(self.artifact, self.edit_perm)
59
            if delete:
59
            if delete:
60
                self.attachment.delete()
60
                self.attachment.delete()
61
                try:
61
                try:
62
                    if self.thumbnail:
62
                    if self.thumbnail:
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
        return self.attachment.serve(embed)
67
        return self.attachment.serve(False)
68
68
69
    @expose()
69
    @expose()
70
    def thumb(self, embed=True):
70
    def thumb(self, embed=True):
71
        return self.thumbnail.serve(embed)
71
        return self.thumbnail.serve(embed)