Switch to unified view

a/Allura/allura/controllers/attachments.py b/Allura/allura/controllers/attachments.py
...
...
10
10
11
    def __init__(self, artifact):
11
    def __init__(self, artifact):
12
        self.artifact = artifact
12
        self.artifact = artifact
13
13
14
    @expose()
14
    @expose()
15
    def _lookup(self, filename, *args):
15
    def _lookup(self, filename=None, *args):
16
        if filename:
16
        if not args:
17
            if not args:
17
            filename = request.path.rsplit('/', 1)[-1]
18
                filename = request.path.rsplit('/', 1)[-1]
18
        filename=unquote(filename)
19
            filename=unquote(filename)
19
        return self.AttachmentControllerClass(filename), args
20
            return self.AttachmentControllerClass(filename), args
21
        else:
22
            raise exc.HTTPNotFound
20
23
21
class AttachmentController(BaseController):
24
class AttachmentController(BaseController):
22
    AttachmentClass = None
25
    AttachmentClass = None
23
    edit_perm = 'edit'
26
    edit_perm = 'edit'
24
27