re: Build a simple app using Node JS and MySQL. VIEW POST

FULL DISCUSSION
 

I have created a node & mysql app following this tutorial. It's all good but when i open the image, the image is not opening. all images size is 0 bytes only. Seeing broken image in browser too.

 

Sorry about that, I think these may be the possible reasons

  1. The SQL statement
  2. The image url. Check the console of your browser if any errors exist
 
 

Hello

I change the first line by :
fs.writeFile(public/assets/img/${image_name},uploadedFile.data, function (err) {...

And it's work for me

code of conduct - report abuse