Node.js - Upload folder

Hello!

I created a “Uploads” folder, outside the public folder on my node.js web app and set the folder name on the project settings:

I can’t access the file inside my app, returns 404 error:

Should I create the upload folder inside the public folder? If yes, am I going to have problems when the app go to production? I’m using docker!

Thanks!

If you want to make all files public accessible then you can add an upload folder to the public folder, it will then be directly accessible. If you want to protect the uploaded files, prevent public access to it then leave it outside the public folder. When outside the public folder you will need to create a server connect action for the download, in that you can also have steps to track downloads, access security etc.

3 Likes

Thanks @patrick!