diff --git a/packages/strapi-admin/controllers/Webhooks.js b/packages/strapi-admin/controllers/Webhooks.js index 785baa039e..a307e3c4f0 100644 --- a/packages/strapi-admin/controllers/Webhooks.js +++ b/packages/strapi-admin/controllers/Webhooks.js @@ -8,6 +8,7 @@ const ALLOWED_EVENTS = [ 'entry.update', 'entry.delete', 'media.create', + 'media.update', 'media.delete', ]; @@ -165,11 +166,7 @@ module.exports = { const webhook = await strapi.webhookStore.findWebhook(id); - const response = await strapi.webhookRunner.run( - webhook, - 'trigger-test', - {} - ); + const response = await strapi.webhookRunner.run(webhook, 'trigger-test', {}); ctx.body = { data: response }; }, diff --git a/packages/strapi-plugin-upload/services/image-manipulation.js b/packages/strapi-plugin-upload/services/image-manipulation.js index 1a6bdbb5d5..9a32ec8779 100644 --- a/packages/strapi-plugin-upload/services/image-manipulation.js +++ b/packages/strapi-plugin-upload/services/image-manipulation.js @@ -13,7 +13,7 @@ const getMetadatas = buffer => const getDimensions = buffer => getMetadatas(buffer) - .then(({ width, height }) => ({ width, height })) + .then(({ width = null, height = null }) => ({ width, height })) .catch(() => ({})); // ignore errors const THUMBNAIL_RESIZE_OPTIONS = {