Is there a way to automatically trigger file upload to AWS without having to click the "choose file" button?
Here is the code in my .html file:
<div class="content">
<input (change)="onChangeFile($event)" type="file" />
</div>
And here is the code in my .ts file:
async onChangeFile(event: any) {
console.log(event.target.files[0]);
this.fileSelected = event.target.files[0];
console.log(environment);
console.log('Uploaded');
await this.S3CustomClient.uploadFile(
.uploadFile(this.fileSelected, this.fileSelected.type, undefined, this.fileSelected.name, "private")
.then((data: UploadResponse) => console.log(data))
.catch((err: any) => console.error(err))