umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.49k stars 2.69k forks source link

v7.15.*: Media picker incorrect preview of svg and files #8239

Closed alexeygilmanov closed 2 years ago

alexeygilmanov commented 4 years ago

Media picker no longer show correct preview of selected svg images and files as it did previous on 7.13.*. Tested on Umbraco 7.15.5

Umbraco version

I am seeing this issue on Umbraco version: 7.15.5

Reproduction

Bug summary

It looks like there were changes introduced in Umbraco.Core.Persistence.Repositories.EntityRepository.GetFullSqlForEntityType to get rid of method GetFullSqlForMedia so no more additional fields are fetched from database like umbracoFile, umbracoWidth, umbracoHeight, umbracoBytes, umbracoExtension, umbracoTitle These leads to the lack of metaData info returned from /umbraco/backoffice/UmbracoApi/Entity/GetByIds?type=Media request that is used in Umbraco.Web.UI.Client\src\views\propertyeditors\mediapicker\mediapicker.html to determine the correct media preview.

Response from 7.13.1:

media_response_7131

Response from 7.15.5:

media_response_7155

Mediapicker view:

mediapicker-view

Specifics

Steps to reproduce

  1. Add property with Media Picker editor to Document type.
  2. Open/create document of this Document Type.
  3. Try to add some .svg Image media or any File media

issue_svg_files

Expected result

expected-result

There should be a correct thumbnail preview of selected .svg Image and any File media

Actual result

actual-result

There are blank .svg Image preview and corrupted File preview (lack of file extension).

umbrabot commented 2 years ago

Hiya @alexeygilmanov,

Just wanted to let you know that we noticed that this issue got a bit stale and might not be relevant any more.

We will close this issue for now but we're happy to open it up again if you think it's still relevant (for example: it's a feature request that's not yet implemented, or it's a bug that's not yet been fixed).

To open it this issue up again, you can write @umbrabot still relevant in a new comment as the first line. It would be super helpful for us if on the next line you could let us know why you think it's still relevant.

For example:

@umbrabot still relevant This bug can still be reproduced in version x.y.z

This will reopen the issue in the next few hours.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face: