Skip to content

Instantly share code, notes, and snippets.

View fetus-hina's full-sized avatar
💭
I may be slow to respond.

AIZAWA Hina fetus-hina

💭
I may be slow to respond.
View GitHub Profile
@virolea
virolea / upload.js
Last active October 10, 2024 15:11
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])