R
Railway8mo 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
Percy8mo ago
Project ID: N/A
Brody
Brody8mo ago
are there any errors? besides the 404
Ripper
Ripper8mo ago
nope, just keeps polling also i have a postgress which i update based on the response
Brody
Brody8mo ago
how big are these files?
Ripper
Ripper8mo ago
any file size..doesnt matter it does get uploaded, i can see them on the uplaodthing portal
Brody
Brody8mo ago
so it seems like there's an issue with the code that checks if the file is present in uploadthing
Ripper
Ripper8mo ago
its working on other hosting and also locally
Brody
Brody8mo ago
that doesn't rule out a code issue, railway runs your code as is after all what kind of app is this?
Ripper
Ripper8mo ago
next js +tailwind css
Brody
Brody8mo ago
what version of node are you using locally and what version is railway using
Ripper
Ripper8mo ago
mine is 20.6.3 where can i check in railway
Brody
Brody8mo ago
in the build table at the top of the build logs
Ripper
Ripper8mo ago
its 18
No description
Brody
Brody8mo ago
its a shot in the dark, but set engines.node to 20 in your package.json
Ripper
Ripper8mo ago
okay, let me try dint work
Brody
Brody8mo 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
Ripper8mo 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
Ripper8mo ago
No description
Brody
Brody8mo ago
my pointer would be to sprinkle in debug logging
Ripper
Ripper8mo ago
hmm, okay