Do not use default url when conversion does not exists #3836
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think this actually may also fix a security risk:
It shouldn't fallback to the default media asset (
media_original_filename.mp4
), as in my case this is not exposed to the public.This results in a 403 (because I have set my s3 permissions correctly), but could result in exposing information and a invalid fallback even if public (it tried to render an image with a mp4 file).
I do understand you can use
hasGeneratedConversion(..)
, but I think most will just return a null if not generated yet. For example:It's perfectly possible to do the
null
check in your frontend, or even implement the fallback in a component (e.g. broken image icon).