ImageKit unable to find files from UploadThing

Hey guys, I'm trying to use imagekit.io to generate various optimized versions of images I upload to uploadthing, but when I try to access a file from uploadthing using the remote address, imagekit seems to get a 404. Looking through the docs it looks like imagekit might need to be whitelisted (https://imagekit.io/docs/integration/connect-external-storage#whitelist-requests-from-imagekit.io) but I'm not sure that's possible right? Trying to avoid having to upload files to imagekit as well as uploadthing. Anyone got any pointers/suggestions?
Connect external storage
ImageKit.io supports connecting external storage like Amazon S3, Azure Blob Storage, Google Cloud Storage, Web Servers, and more.
5 Replies
markr
markr4mo ago
What urls are you providing to imagekit? do the urls you are providing resolve normally in your browser?
brinsleylogic
brinsleylogicOP3mo ago
Yea they do, I'm just passing the ufsUrl returned after uploading the file to uploadthing - the xxx.ufs.sh/f/xxx formatted url. @markr any insight in to what could be up? Happy to dig in to explore/debug to find a solution but think I need some direction on where to start.
markr
markr3mo ago
we're not explicitly blocking it with WAF, not sure if cloudflare blocks by default, i don't think so though
brinsleylogic
brinsleylogicOP3mo ago
I might just need to find an alternative solution for running media conversions/optimizations. A shame as it seemed like a no-brainer to combine UT and IK.

Did you find this page helpful?