R
Railway14mo ago
Ripper

Unable to upload file (using uploadthing api) in production website (live site on railway )

Unable to upload file (using uploadthing api) in production website (live site on railway ) I am trying to upload a file and then checking the response from the db if the file exists or not. If it does then proceed further else poll. The flow is working fine on local setup or versel but when deploying on railway i am getting 404 as response. - the file get uploaded on uploadthing (checked on the portal)
20 Replies
Percy
Percy14mo ago
Project ID: N/A
Brody
Brody14mo ago
are there any errors? besides the 404
Ripper
RipperOP14mo ago
nope, just keeps polling also i have a postgress which i update based on the response
Brody
Brody14mo ago
how big are these files?
Ripper
RipperOP14mo ago
any file size..doesnt matter it does get uploaded, i can see them on the uplaodthing portal
Brody
Brody14mo ago
so it seems like there's an issue with the code that checks if the file is present in uploadthing
Ripper
RipperOP14mo ago
its working on other hosting and also locally
Brody
Brody14mo ago
that doesn't rule out a code issue, railway runs your code as is after all what kind of app is this?
Ripper
RipperOP14mo ago
next js +tailwind css
Brody
Brody14mo ago
what version of node are you using locally and what version is railway using
Ripper
RipperOP14mo ago
mine is 20.6.3 where can i check in railway
Brody
Brody14mo ago
in the build table at the top of the build logs
Ripper
RipperOP14mo ago
its 18
No description
Brody
Brody14mo ago
its a shot in the dark, but set engines.node to 20 in your package.json
Ripper
RipperOP14mo ago
okay, let me try dint work
Brody
Brody14mo ago
at this time all signs are pointing to a code issue, add some debugging to try to figure out why your polling requests aren't returning any files
Ripper
RipperOP14mo ago
okay but is there some pointer i can look into wrt to response - as its really weird why i am getting the resp propely on my local but not here
Ripper
RipperOP14mo ago
No description
Brody
Brody14mo ago
my pointer would be to sprinkle in debug logging
Ripper
RipperOP14mo ago
hmm, okay
Want results from more Discord servers?
Add your server