I would like to know how I can be sending an image to an angle 6 through the post method.
First I should encode this image in base 64 and then I'll send all that coding as a value of a key ????
I would like to know how I can be sending an image to an angle 6 through the post method.
First I should encode this image in base 64 and then I'll send all that coding as a value of a key ????
In Angular 6, you can send the bits of the image in the body of the POST request.
sendImage(imagem) {
return this.httpClient.post(URL, imagem, {headers: this.headers});
}
And then the server would process the bits of the image and store the file in memory. You can use the same logic with the PUT request.
Sending through a GET request culminates in placing the bits of the image in the request header.