Created
May 16, 2021 20:24
-
-
Save Ndohjapan/ddc520de58da22b17e74337adde802f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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