@websanova/vue-upload
Version:
A simple, light weight and intuitive upload control for Vue.js.
7 lines (6 loc) • 572 B
JavaScript
/*!
* @websanova/vue-upload v2.4.1
* https://websanova.com/docs/vue-upload
* Released under the MIT License.
*/
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.VueUpload=n()}(this,function(){return{call:function(e){var n=e.url,o=e.body,t=this.plugins.http.CancelToken.source();return delete e.url,delete e.body,this.plugins.http[e.method||"post"](n,o,Object.assign({onUploadProgress:e.progress,cancelToken:t.token},e)).then(e.success,e.error),{abort:function(){t.cancel()}}}}});