We're a place where coders share, stay up-to-date and grow their careers.
Hello, sorry for the delayed reply. No additional permission was required for the folder and kindly compare this file with yours to ensure there are no errors in the addPlayer function.
there are no differences. the files are identical. the files are created but 0 bytes. Any suggestions?
I have no suggestions yet, but is it working?
Following the post of Al-mck....
I change the first line by : fs.writeFile(public/assets/img/${image_name},uploadedFile.data, function (err) {...
and now it's working fine.
Best Rgs.
it does not throw errors:
uploadedFile.mv(public/assets/img/${image_name}, (err ) => { if (err) { return res.status(500).send(err); }
public/assets/img/${image_name}
Hello, sorry for the delayed reply. No additional permission was required for the folder and kindly compare this file with yours to ensure there are no errors in the addPlayer function.
there are no differences.
the files are identical.
the files are created but 0 bytes.
Any suggestions?
I have no suggestions yet, but is it working?
Following the post of Al-mck....
I change the first line by :
fs.writeFile(public/assets/img/${image_name},uploadedFile.data, function (err) {...
and now it's working fine.
Best Rgs.
it does not throw errors:
uploadedFile.mv(
public/assets/img/${image_name}
, (err ) => {if (err) {
return res.status(500).send(err);
}