-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
I am attempting to rename a file , pretty much following along with the example in the documentation. but it is getting an Error response: { error: 'Invalid CSRF Token' }
here is how I have the code set up:
await imagekit.renameFile({
filePath: oldFilePath,
newFileName: "newImageName.jpg",
purgeCache: false,
})Just before this I am retrieving the oldFilePath value via a imagekit.getFileDetails call:
const { filePath:oldFilePath } = await imagekit.getFileDetails(fileID)and that is correctly giving me the file path, so the ImageKit instance appears to be set up correctly, its just the renameFile that is failing on me.
I am running the in a NextJS application as a localhost server in case that makes a difference. I am not familiar with CSRF Tokens, is there something I have to change to get the tokens to validate correctly?
Metadata
Metadata
Assignees
Labels
No labels