stick attachments links to backoffice when shown on backoffice (#47704)
This commit is contained in:
parent
8407016c97
commit
9d0ca1c090
|
@ -63,8 +63,9 @@ def form_attachment(self):
|
|||
if not isinstance(p, AttachmentEvolutionPart):
|
||||
continue
|
||||
if os.path.basename(p.filename) == fn:
|
||||
return redirect( '%sfiles/attachment-%s/%s' % (
|
||||
self.filled.get_url(), fn, urllib.quote(p.base_filename)))
|
||||
is_in_backoffice = bool(get_request() and get_request().is_in_backoffice())
|
||||
return redirect('%sfiles/attachment-%s/%s' % (
|
||||
self.filled.get_url(backoffice=is_in_backoffice), fn, urllib.quote(p.base_filename)))
|
||||
|
||||
raise TraversalError()
|
||||
|
||||
|
|
Loading…
Reference in New Issue