0
HTTP POST API를 통해 이미지를 업로드하고 싶습니다. 내 의견은 이렇습니다.각도 4 이미지 업로드
<input type="file" (change)="changedata($event)" name="file"/>
및 Changedata() 기능.
let fileList: FileList = event.target.files;
if (fileList.length > 0) {
let file: File = fileList[0];
let formData: FormData = new FormData();
formData.append('File', file, file.name);
this.mainservice.updateIcon(formData).subscribe(responseData=>{
console.log(' Reposnce Data ',responseData)
})
}
내가 요청 페이로드는 보내지 이미지를 확인 .. 내가 base64로 이미지를 보낼 수있는 방법 https://www.screencast.com/t/vKFKj0S3
를 참조?