mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
Merge pull request #15843 from strapi/fix/crop-asset-folder
EditAssetDialog: Only send the folderId when saving the cropped asset
This commit is contained in:
commit
2acd06c23f
@ -88,7 +88,7 @@ export const PreviewBox = ({
|
|||||||
}, [isCropImageReady, hasCropIntent, onCropStart, crop]);
|
}, [isCropImageReady, hasCropIntent, onCropStart, crop]);
|
||||||
|
|
||||||
const handleCropping = async () => {
|
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);
|
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
|
// Making sure that when persisting the new asset, the URL changes with width and height
|
||||||
|
Loading…
x
Reference in New Issue
Block a user