Answer the question
In order to leave comments, you need to log in
How to upload an image to the server by its URL in Angular?
Good afternoon!
There is a working service method for uploading a file to the server:
logoUpload(uploadData) {
const url = this.apiHost+'client/logo-upload';
return this.http.post<LogoUploadResponse>(url, uploadData).pipe(
tap((newLogo: LogoUploadResponse) => this.log(`uploaded logo`)),
catchError(this.handleError<LogoUploadResponse>('logoUpload'))
);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question