Skip to content

Commit 6f5edad

Browse files
committed
feat: convert transformation array to string format for image signing requests
1 parent 3251f79 commit 6f5edad

File tree

1 file changed

+10
-2
lines changed
  • packages/imagekit-editor-dev/src

1 file changed

+10
-2
lines changed

packages/imagekit-editor-dev/src/store.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { UniqueIdentifier } from "@dnd-kit/core"
22
import {
33
buildSrc,
4+
buildTransformationString,
45
type Transformation as IKTransformation,
56
} from "@imagekit/javascript"
67
import { create } from "zustand"
@@ -32,7 +33,7 @@ export interface SignerRequest<
3233
Metadata extends RequiredMetadata = RequiredMetadata,
3334
> {
3435
url: string
35-
transformation: IKTransformation[]
36+
transformation: string
3637
metadata: Metadata
3738
}
3839

@@ -550,7 +551,14 @@ const calculateImageList = (
550551
imgs[index] = cached
551552
} else {
552553
imgs[index] = req.url
553-
toSign.push({ index, request: req, cacheKey })
554+
toSign.push({
555+
index,
556+
request: {
557+
...req,
558+
transformation: buildTransformationString(req.transformation),
559+
},
560+
cacheKey,
561+
})
554562
}
555563
return
556564
}

0 commit comments

Comments
 (0)