Last active
July 15, 2021 12:44
-
-
Save codeBelt/5d83ab099468d7210a7a381c0ddfb3a8 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
... | |
const config = { | |
headers: { 'content-type': 'multipart/form-data' }, | |
onUploadProgress: (event) => { | |
console.log(`Current progress:`, Math.round((event.loaded * 100) / event.total)); | |
}, | |
}; | |
const response = await axios.post('/api/uploads', formData, config); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment