select file upload form-data is empty #676
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
html:
<input type="file" ng2FileSelect [uploader]="uploader"/>
<button type="button" name="button" class="upload-file-btn" (click)="uploadFile()">upload/button>
ts:
uploadFile() {
console.log(this.uploader);
// console.log(this.uploader.queue[0].);
// 上传
this.uploader.queue[0].onSuccess = function(response, status, headers) {
// 上传文件成功
if (status == 200) {
console.log(response);
// 上传文件后获取服务器返回的数据
// let tempRes = JSON.parse(response);
} else {
// 上传文件后获取服务器返回的数据错误
alert("");
}
};
this.uploader.queue[0].upload(); // 开始上传
}
I have the same problem :( any ideas?
Me too the smae problem. Any ideas?