NestJS + React UploadThing Integration - Middleware Not Executing
I'm trying to integrate UploadThing with NestJS (backend) and React (frontend) but facing issues where the UploadThing middleware isn't executing properly.
Here's my setup: Check attached images.
Current Behavior: - When I try to upload a file: -- The request gets stuck pending at: http://localhost:4001/api/uploadthing/instagram?actionType=upload&slug=instagram -- Only console.log('Upload middleware completed', data) gets logged (with data being undefined) -- The UploadThing middleware (console.log('Upload middleware executing')) never gets executed -- None of the frontend component's console logs are triggered - Environment Setup: -- Backend running on port 4001 (NestJS) -- Frontend running on different port (Vite) -- CORS is enabled in NestJS -- UploadThing token is properly configured
Questions:
Why isn't the UploadThing middleware executing?
Why is the upload request getting stuck in a pending state?
Is there something specific needed for NestJS integration that I'm missing?
Any help would be greatly appreciated! Let me know if you need any additional information.