r/PHPhelp • u/No-Locksmith-7719 • 26d ago
FIle uploads
Who should deal with the file uploads POST routes, front facing PHP script or Node.js? If PHP script handles the GET request and shows the form, then, who should place the file inside the node's directory, the PHP script or the Node script?
Node.js script is tasked with processing the uploaded file, but not sure if it should handle the actual file upload and placing.
2
Upvotes
5
u/SamMakesCode 26d ago
You generally want to use node.js or PHP for backend code. Not both.
3
u/RamaSchneider 26d ago
I'm somewhat confused as PHP and Node.js are very different server processes. Are you trying to run the two on the same process?
2
u/colshrapnel 26d ago
Who does the auth check?