mirror of
https://github.com/strapi/strapi.git
synced 2025-09-06 15:22:59 +00:00
Clear db formats on replace
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
This commit is contained in:
parent
6cdf0a7891
commit
5de985d724
@ -197,6 +197,9 @@ module.exports = {
|
||||
|
||||
await strapi.plugins.upload.provider.upload(fileData);
|
||||
|
||||
// clear old formats
|
||||
_.set(fileData, 'formats', {});
|
||||
|
||||
const thumbnailFile = await generateThumbnail(fileData);
|
||||
if (thumbnailFile) {
|
||||
await strapi.plugins.upload.provider.upload(thumbnailFile);
|
||||
|
Loading…
x
Reference in New Issue
Block a user