Created
February 17, 2017 22:47
-
-
Save skellock/ccfece63b6f4af5bd8b13d08ff4e0c59 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
api.post('/upload', data, { | |
onUploadProgress: progressEvent => { | |
const percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total) | |
// don't be spammy when we log | |
if (percentComplete % 10 === 0) { | |
console.tron.log(``) | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment