I am facing errors while uploading files to S3 from Angular 8 Project. I have follow below tutorial and do the required things
https://medium.com/ramsatt/angular-7-upload-file-to-amazon-s3-bucket-ba27022bad54
But I am not able to use S3 Library in service file.
below lines are generating errors that i think but still not sure where is missing things
import * as AWS from 'aws-sdk/global';
import * as S3 from 'aws-sdk/clients/s3';
Is there anyone who can help me to get rid out of it.
I finally come with solution after spending couple of hours on it. solutions steps are as below for Angular 8 Project.
Install dependancy
npm install --save-dev @types/node
Need to add "types": ["node"] to the tsconfig.app.json
Add below lines in polyfills.js
if (typeof (window as any).global === 'undefined') { (window as any).global = window; }
Reference : Last answer by @AWS PS (Step 1)
Reference : https://github.com/aws/aws-sdk-js/issues/1271 (Step 2)
Reference : https://github.com/bevacqua/dragula/issues/602 (Step 3)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With