hezzze/strapi-provider-upload-oss

When I upload image, it also generates multiple thumbnails.

Closed this issue · 2 comments

When I upload an image in Media Library, the plugin generates multiple thumbnails.
I read the code only mp4 can generate thumbnails. That's wired, hope some help.

[2020-07-15T14:00:01.653Z] debug >>>>>>> upload oss <<<<<<<
[2020-07-15T14:00:01.684Z] debug undefined
[2020-07-15T14:00:02.042Z] debug >>>>>>> upload oss <<<<<<<
[2020-07-15T14:00:02.042Z] debug undefined
[2020-07-15T14:00:02.135Z] debug >>>>>>> upload oss <<<<<<<
[2020-07-15T14:00:02.137Z] debug undefined
[2020-07-15T14:00:02.183Z] debug >>>>>>> upload oss <<<<<<<
[2020-07-15T14:00:02.183Z] debug undefined
[2020-07-15T14:00:02.514Z] debug >>>>>>> upload oss <<<<<<<
[2020-07-15T14:00:02.531Z] debug undefined
[2020-07-15T14:00:02.620Z] debug >>>>>>> upload oss <<<<<<<
[2020-07-15T14:00:02.620Z] debug undefined
[2020-07-15T14:00:02.620Z] debug >>>>>>> upload oss <<<<<<<
[2020-07-15T14:00:02.633Z] debug undefined
[2020-07-15T14:00:02.718Z] debug >>>>>>> upload oss <<<<<<<
[2020-07-15T14:00:02.718Z] debug undefined
[2020-07-15T14:00:02.718Z] debug >>>>>>> upload oss <<<<<<<
[2020-07-15T14:00:02.726Z] debug undefined
[2020-07-15T14:00:02.779Z] debug >>>>>>> upload oss <<<<<<<
[2020-07-15T14:00:02.779Z] debug undefined
[2020-07-15T14:00:02.988Z] debug POST /upload (1672 ms) 200
[2020-07-15T14:00:03.352Z] debug GET /upload/files/count? (40 ms) 200

image

Hi @loongmxbt, I'm pretty sure these are not thumbnails, as you mentioned the thumbnails will only be generated when you upload .mp4 files

Also if you look at code here
https://github.com/hezzze/strapi-provider-upload-oss/blob/master/lib/index.js#L126

each generated thumbnail will have a suffix of ${THUMBNAIL_SIZE} which is hard coded as 480x360.

My guess is that this is done by the strapi media library, but will look into that

http://localhost:1337/admin/settings/media-library
That's a new feature of Strapi, can be closed here.