Skip to content

Commit

Permalink
Ensure sas token is appended to azure blob url
Browse files Browse the repository at this point in the history
Signed-off-by: Kipchirchir Sigei <arapgodsmack@gmail.com>
  • Loading branch information
KipSigei committed Sep 25, 2023
1 parent 16d9d5e commit a39a26e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onadata/apps/viewer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
str_to_bool,
)
from onadata.libs.utils.google import create_flow
from onadata.libs.utils.image_tools import image_url
from onadata.libs.utils.image_tools import image_url, generate_media_download_url
from onadata.libs.utils.log import Actions, audit_log
from onadata.libs.utils.logger_tools import (
generate_content_disposition_header,
Expand Down Expand Up @@ -885,7 +885,7 @@ def attachment_url(request, size="medium"):

return response
if not attachment.mimetype.startswith("image"):
return redirect(attachment.media_file.url)
return generate_media_download_url(attachment)
media_url = image_url(attachment, size)
if media_url:
return redirect(media_url)
Expand Down

0 comments on commit a39a26e

Please sign in to comment.