有没有办法取消使用流星弹弓的活动文件上传?
Is there any way to cancel an active file upload using meteor-slingshot?
我想为用户提供取消现有文件上传的功能,是否有任何解决方法可以实现这一点?
从版本 0.6.1 开始有...
如果您像这样上传文件:
var uploader = new Slingshot.Upload("myFileUploads");
uploader.send(document.getElementById('input').files[0]);
然后你可以中止它:
uploader.xhr.abort();
我想为用户提供取消现有文件上传的功能,是否有任何解决方法可以实现这一点?
从版本 0.6.1 开始有...
如果您像这样上传文件:
var uploader = new Slingshot.Upload("myFileUploads");
uploader.send(document.getElementById('input').files[0]);
然后你可以中止它:
uploader.xhr.abort();