Switch to unified view

a/Allura/allura/controllers/attachments.py b/Allura/allura/controllers/attachments.py
...
...
74
                fp.content_type = 'application/octet-stream'
74
                fp.content_type = 'application/octet-stream'
75
            response.headers['Content-Type'] = fp.content_type.encode('utf-8')
75
            response.headers['Content-Type'] = fp.content_type.encode('utf-8')
76
            response.content_type = fp.content_type.encode('utf-8')
76
            response.content_type = fp.content_type.encode('utf-8')
77
            if not embed:
77
            if not embed:
78
                response.headers.add('Content-Disposition',
78
                response.headers.add('Content-Disposition',
79
                                     'attachment;filename=%s' % filename)
79
                                     'attachment;filename="%s"' % filename)
80
            else:
81
                response.headers.add('Content-Disposition',
82
                                     'filename="%s"' % filename)
80
            return fp.read()
83
            return fp.read()
81
        return self.filename
84
        return self.filename
82
85
83
    @expose()
86
    @expose()
84
    def thumb(self, embed=True):
87
    def thumb(self, embed=True):