From b335cc8814381e721977552e92947fcbf6a7782a Mon Sep 17 00:00:00 2001 From: Gustav Hansen Date: Thu, 16 Feb 2023 14:59:42 +0100 Subject: [PATCH] EditAssetDialog: Only send the folderId when saving the cropped asset --- .../admin/src/components/EditAssetDialog/PreviewBox/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/upload/admin/src/components/EditAssetDialog/PreviewBox/index.js b/packages/core/upload/admin/src/components/EditAssetDialog/PreviewBox/index.js index e72835651a..b26f159e28 100644 --- a/packages/core/upload/admin/src/components/EditAssetDialog/PreviewBox/index.js +++ b/packages/core/upload/admin/src/components/EditAssetDialog/PreviewBox/index.js @@ -88,7 +88,7 @@ export const PreviewBox = ({ }, [isCropImageReady, hasCropIntent, onCropStart, crop]); const handleCropping = async () => { - const nextAsset = { ...asset, width, height }; + const nextAsset = { ...asset, width, height, folder: asset.folder?.id }; const file = await produceFile(nextAsset.name, nextAsset.mime, nextAsset.updatedAt); // Making sure that when persisting the new asset, the URL changes with width and height