fix: generate png thumbnail previews for svg files - #31883
Conversation
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
🦋 Changeset detectedLatest commit: fec0686 The changes in this PR will be included in the next version bump. This PR includes changesets to release 31 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #31883 +/- ##
========================================
Coverage 54.50% 54.50%
========================================
Files 2294 2294
Lines 50562 50562
Branches 10325 10325
========================================
Hits 27561 27561
Misses 20501 20501
Partials 2500 2500
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
MarcosSpessatto
left a comment
There was a problem hiding this comment.
We could add a test case to cover this. We can get the message and see if there is one of the files with the desired extension.
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
|
Also, I'm seeing a lot of for example, what are the chances of a file getting uploaded without a filename, shouldn't we fail the action if there is no name? Then wouldn't have to fallback onto an empty string there. |
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
It seems we cannot upload a file without a name. So, I can remove the fallback |
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
debdutdeb
left a comment
There was a problem hiding this comment.
code lgtm. didn't test it. 👍
Proposed changes (including videos or screenshots)
Fixed an issue where SVG thumbnails were incorrectly handled as PNGs, causing preview errors. Now, the system correctly identifies and presents the generated PNG thumbnails, allowing for proper SVG image previews.
Issue(s)
Steps to test or reproduce
Outline the steps to test or reproduce the PR here.
Further comments
SUP-495