imagekit-nodejs
imagekit-nodejs copied to clipboard
Issue with data image uploads in specified folders only
For context, I'm using NextJS, but not sure if that's relevant - and I'm uploading images (specifically in .webp format), and via base64 strings.
If I specify an existing sub folder location, the file returns a not found error and the preview in the imagekit UI is also broken. If I download the file from the dashboard, the file can open and is viewable etc.
However, if I don't specify a sub folder, and create a new folder (e.g. a random string that represents a user ID), it works.
Example that works, this creates a new folder in the root of my account, and the image is there and works as expected:
imagekit.upload({
folder: `${userId}`,
file: file.src,
fileName: file.fileName,
}),
Example that still creates the new folder as expected, and the file is present - but when linking to it, the files are not found and broken in the imagekit dashboard UI:
imagekit.upload({
folder: `existing/folders/${userId}`,
file: file.src,
fileName: file.fileName,
}),
Any help appreciated!
To update, the returned thumbnailUrl does in fact work, just not the actual url
This was resolved via imagekit email support.
This issue was caused because I had a URL endpoint configured that matched the folder structure I was using. Removing the URL endpoint resolved the issue.