Issue 17128 - Fix GetMediaByPath when querying for media which has been uploaded with dimensions in the file name#17314
Conversation
… path for files that contain the sizes in the file name (i.e. image_200x200.jpg)
|
Hi there @justin-nevitech, thank you for this contribution! 👍 While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
|
@justin-nevitech thanks for your PR to fix the issue #17128! One of the Core Collabs team will review it soon 🙌 |
|
Looks good, tests good, and covers the old use case too🚀 |
|
Thanks @Zeegaan Sorry for the branching issues! |
Prerequisites
If there's an existing issue for this PR then this fixes:
Fixes #17128
Description
This PR fixes the issue raised in #17128 where media is uploaded to the media library with dimensions in the file name but then cannot be queried using IMediaService.GetMediaByPath (see issue details for more information).
All tests have run and pass.
Steps to Test
Notes
To be honest, I can't find what may have originally created media files with dimensions in the name, it looks like something must have done this in the past when uploading (so resized images are supported). I can't see where this is done or if it's legacy code so I couldn't see how to test this aspect.
I've completed this PR on v13 but it will need merging into v14 and v15 as well.