I'm using npm imgur to have my users upload an image. Is there a way to have an uploading message pop up while I'm waiting for the the image to upload? I don't think I want the whole page to be reloaded, just a pop up of sorts.
This is what the basic code looks like in my POST method:
imgur
.uploadFile(`myFile.jpeg`)
.then((json) => {
console.log(json);
}
Is there a callback for imgur.uploadFile or is there something I can do right above this code maybe with flash and/or ejs?
I ended up just doing it in the ejs file with an
onclickevent on thesubmitbutton that creates an image tag linked to a loading-spin animation.