Skip to content

Instantly share code, notes, and snippets.

View micc83's full-sized avatar

Alessandro Benoit micc83

View GitHub Profile
@micc83
micc83 / upload.js
Created April 30, 2021 13:03 — forked from virolea/upload.js
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])