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