Looking to Upload a File:
// Using the pre-signed URL to upload the file
const httpOptions = {
headers: new HttpHeaders({
'Content-Disposition': 'attachment;filename=' + file.name + '',
observe: 'response'
})
};
this.httpClient.put(preSingedUrl, file, httpOptions)
.subscribe((response: HttpResponse<any>) => {
console.log(response); // The response is returning null
});
The response always shows null, even though the network tab displays a status of 200 OK.
access-control-allow-methods: GET, POST, OPTIONS
access-control-allow-origin: *
content-length: 1207
content-type: application/json
date: Tue, 25 Jun 2019 07:38:06 GMT
status: 200
strict-transport-security: 'max-age=31536000'
x-amz-apigw-id: someid
x-amzn-requestid: someid
x-amzn-trace-id: Root=someid;Sampled=1
Any suggestions on how to properly read the status "200 OK" in Angular 8 would be greatly appreciated.