Skip to content

Instantly share code, notes, and snippets.

@Ndohjapan
Created May 16, 2021 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ndohjapan/ddc520de58da22b17e74337adde802f3 to your computer and use it in GitHub Desktop.
Save Ndohjapan/ddc520de58da22b17e74337adde802f3 to your computer and use it in GitHub Desktop.
app.post("/upload", (req, res) => {
// This is the response sent to the user in the browser once the file recieved
upload(req, res, (err) => {
if(err){
res.send(err)
// This will display the error message to the user
}
else{
res.send("File Uploaded Successfully")
// This shows the file has beem successfully uploaded
// The image will be found in the public folder
}
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment