0

I'm currently using the client/public/storage as a location to store downloaded pictures for my website for user related content. Of course this is only temporary to help me build my concept before booting things on the cloud.

My issue is when using Axios multipart/form-data to upload user submitted pictures to the location stated above, though Nodemon is supposed to be filtering out files that are not ".js", it's still somehow triggering a page refresh on my React app. I don't even need to run Axios for this, I can reproduce the issue just by manually putting a picture in the client/public/storage location.

I couldn't understand why, and I'm sure it's Nodemon doing it because when I run the app without it (command: replaced script node server instead of nodemon server) and I just manually put a picture in that server, the app doesn't refresh.

Can anyone help me figure out what's going on ? Thanks!

I've attached pictures showing output from Nodemon in verbose whenever I add a new file to the public/storage folder and showing how I run my app "npm run dev"

enter image description here

Nodemon file check

JShmay
  • 172
  • 1
  • 6
  • 18
  • Does this answer your question? [nodemon ignore directory](https://stackoverflow.com/questions/41913086/nodemon-ignore-directory) – Konrad Jul 30 '22 at 09:21
  • Where did you read that `nodemon` ignores not `.js` files? – Konrad Jul 30 '22 at 09:22
  • @KonradLinkowski Extract from their documentation: https://github.com/remy/nodemon#ignoring-files "Ignoring files By default, nodemon will only restart when a .js JavaScript file changes" The content you provided tackles how to ignore .js files in certain directories. My issue is related to a bad match between adding a new picture.jpg file to the public folder which is somehow triggering a page refresh. Thanks for the suggestion though :) – JShmay Jul 30 '22 at 11:03

0 Answers0