Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let conf= {
- onUploadProgress: function (progressEvent) {
- let percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total);
- },
- headers: { 'content-type': 'application/x-www-form-urlencoded' }
- };
- let a = new FormData();
- a.append('file', file[0]);
- axios
- .put(url, a, conf)
- .then(function (res) {
- console.log(res.data);
- })
- .catch(function (err) {
- console.log(err);
- });
Add Comment
Please, Sign In to add comment