Skip to content

Conversation

@darron1217
Copy link
Contributor

@darron1217 darron1217 commented Jan 22, 2021

What does it do?

It changes the way that CardPreview component determine mime type of media preview.

Why is it needed?

I've created plugin that generates video thumbnail.

https://github.com/darron1217/strapi-plugin-video-thumbnail

It generates thumbnail as png type.

Media Library regard it as video, so it tries to play it as a video even though it is an image.

Current Behavior

스크린샷 2021-01-22 오후 5 28 41

After merge

스크린샷 2021-01-22 오후 5 26 27

SideEffects?

I couldn't find side effect of this PR.

Other file types also works fine after merge.
스크린샷 2021-01-22 오후 5 31 07

Related issue(s)/PR(s)

#8575
(maybe) #8750

@darron1217 darron1217 changed the title [Media Library] Get preview mime from thumbnail (to support video thumbnail) [Media Library] Get preview mime type from thumbnail (to support video thumbnail) Jan 22, 2021
@codecov
Copy link

codecov bot commented Jan 22, 2021

Codecov Report

Merging #9184 (b67160c) into master (5d8f5fb) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9184   +/-   ##
=======================================
  Coverage   34.64%   34.64%           
=======================================
  Files        1308     1308           
  Lines       14431    14431           
  Branches     1432     1432           
=======================================
  Hits         5000     5000           
  Misses       8517     8517           
  Partials      914      914           
Flag Coverage Δ
front 26.04% <ø> (ø)
unit 54.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...i-plugin-upload/admin/src/components/List/index.js 0.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 09e0be0...279d356. Read the comment docs.

@alexandrebodin alexandrebodin added source: core:upload Source is core/upload package issue: enhancement Issue suggesting an enhancement to an existing feature labels Jan 22, 2021
Copy link
Contributor

@soupette soupette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Thanks a lot for your contribution

Copy link
Contributor

@HichamELBSI HichamELBSI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexandrebodin alexandrebodin added this to the 3.4.6 milestone Feb 1, 2021
@alexandrebodin alexandrebodin merged commit 6cf2e35 into strapi:master Feb 1, 2021
@derrickmehaffy
Copy link
Member

This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/new-release-strapi-v3-4-6/2631/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

issue: enhancement Issue suggesting an enhancement to an existing feature source: core:upload Source is core/upload package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants