1 回答

TA貢獻(xiàn)2019條經(jīng)驗(yàn) 獲得超9個(gè)贊
您需要自己添加標(biāo)題。
并檢查您的 HttpInterceptor 是否不會(huì)覆蓋您的標(biāo)頭
這將解決問題
const HttpUploadOptions = new HttpHeaders();
HttpUploadOptions.append('Content-Type', 'multipart/form-data');
HttpUploadOptions.append('Accept', 'image/x-png,image/gif,image/jpeg');
this.http.post(PrivateZoneConstants.UploadUserImage, formData,
{
headers: HttpUploadOptions,
reportProgress: true
}).subscribe(res => {
this.localStorageService.setItem('UserLoginClaims', res);
this.fileUploaded = true;
this.loading = false;
this._bottomSheetRef.containerInstance.enter();
});
- 1 回答
- 0 關(guān)注
- 105 瀏覽
添加回答
舉報(bào)