resolve({ default: result['attachment'] })
返回的resolve必须要带default,后面跟附件路径
upload() {
let upload = new Promise((resolve, reject)=>{
this.loader['file'].then(
(data)=>{
this.uploadFile(data,this.url,'sherry')
.subscribe(
(result)=>{
console.log('result',result);
resolve({ default: result['attachment'] })
},
(error)=>{
reject(data.msg);
}
);
}
);
});
return upload;
}
网友评论