I am building out a media uploader for my company in Angular 6, and loading files into our bucket in s3. So far, the files are uploading successfully and showing up in the s3 console, but the POST request always returns 'null', even if it works.
I want to get response data back because I'm trying to keep track of the progress for uploads, to show the user in the UI. But I'm unable to grab any events from a null response.
This is how the working code currently looks. When I add a console.log and check the response it is 'null'. Am I doing anything wrong, or is s3 the problem here?
upload(url: string, data: any) {
const options = { reportProgress: true };
return this.http.post(url, data, options)
.map((response: Response) => response);
}