Prevent page reload in create-react-app after image/file upload [closed]

do this , okkay so what you want to do is either remove submit type from button <input type="button" value="Basic file Upload"> or call your imageUplaod function on onClick event instead of on submit .
it could be realted to web pack , you can ignore images folder :

module.exports = {   
devServer: {     
   watchOptions: {
      ignored: [ path.resolve(__dirname, 'dist'),         
                 path.resolve(__dirname, 'node_modules'),         
                 path.resolve(__dirname, 'images') // image folder path 

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top