Open JoseSilvaSistrade opened 5 years ago
I'm not entirely sure but I think we have the same question maybe, which is ---
Where are the files that are uploaded? They're not in the server folder.
Images are being saved to a folder inside server/uploads with this code:
server/uploads <-- make this folder first
then edit this file: server/upload.js like this:
const IncomingForm = require("formidable").IncomingForm;
module.exports = function upload(req, res) { var form = new IncomingForm();
form.on('fileBegin', function (name, file){
file.path = __dirname + '/uploads/' + file.name;
});
};
You can save the file, in a folder inside of your project?