Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix content api assets endpoint when using s3 #2750

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion content_api/assets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ def get_media_streamed(media_id):
if not app.auth.authorized([], "assets", "GET"):
return app.auth.authenticate()
try:
media_id = media_id.split(".")[0]
media_file = app.media.get(media_id, "upload")
if not media_file:
media_id = media_id.split(".")[0]
media_file = app.media.get(media_id, "upload")
except bson.errors.InvalidId:
media_file = None
if media_file:
Expand Down
Loading