Skip to content

Commit

Permalink
Edit binary instead of creating new one
Browse files Browse the repository at this point in the history
  • Loading branch information
peterMuriuki committed Nov 20, 2024
1 parent bdb6397 commit 5bd2d54
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@ export async function getProductImagePayload(
changed: true,
};
} else {
const id = v4();
// use initial images id for binary resource essentially editing existing binary resource.
const id = initialValues.productImage?.[0]?.uid ?? v4();
const payload: IBinary = {
id,
resourceType: binaryResourceType,
Expand Down

0 comments on commit 5bd2d54

Please sign in to comment.