diff --git a/app/api/canvas/local-edit/route.ts b/app/api/canvas/local-edit/route.ts index 8b3a3ed73..bd032cd1a 100644 --- a/app/api/canvas/local-edit/route.ts +++ b/app/api/canvas/local-edit/route.ts @@ -3889,16 +3889,10 @@ async function createScaleAdjustPatchReference(params: { if (params.fullFrameReferenceOnly && structureLockAppliedRef.value) { if ( params.minimalProductLockMaskEditReferences && + sourceImageUrl && targetDraftReference.productLockOverlayBuffer && targetDraftReference.productLockEditMaskBuffer ) { - const sourceFullBuffer = await sharp(sourceBuffer, { failOn: "none" }) - .png({ compressionLevel: 6 }) - .toBuffer(); - const sourceFullUpload = await uploadFile( - `canvas-scale-adjust-source-full-${suffix}.png`, - toArrayBuffer(sourceFullBuffer) - ); const productLockOverlayUpload = await uploadFile( `canvas-scale-adjust-product-lock-overlay-${suffix}.png`, toArrayBuffer(targetDraftReference.productLockOverlayBuffer) @@ -3929,11 +3923,11 @@ async function createScaleAdjustPatchReference(params: { productLockFalEditMaskUrl: productLockFalEditMaskUpload?.url || null, productLockOverlayUrl: productLockOverlayUpload.url, productLockProtectMaskUrl: productLockProtectMaskUpload?.url || null, - sourceCropUrl: sourceImageUrl || sourceFullUpload.url, - sourceFullUrl: sourceFullUpload.url, + sourceCropUrl: sourceImageUrl, + sourceFullUrl: sourceImageUrl, structureLockedDraft: structureLockAppliedRef.value, - targetDraftFullUrl: sourceImageUrl || sourceFullUpload.url, - targetDraftUrl: sourceImageUrl || sourceFullUpload.url, + targetDraftFullUrl: sourceImageUrl, + targetDraftUrl: sourceImageUrl, workspacePixelRect, workspaceRect, };