Reputation: 815
I've followed below link and trying to implement file upload feature in Angular 8. https://medium.com/ramsatt/angular-7-upload-file-to-amazon-s3-bucket-ba27022bad54,
npm install aws-sdk --save
npm install --save-dev @types/node
Need to add "types": ["node"] to the tsconfig.app.json
Add below lines in polyfills.js - Not sure where can I add in polyfills.js.
if (typeof (window as any).global === 'undefined') { (window as any).global = window; }
After adding above line I'm getting error.
[error] C:\Users\admin\source\repos\polling-app-ui2\node_modules\graceful-fs\polyfills.js:7
if (typeof (window as any).global === 'undefined') { (window as any).global = window; }
SyntaxError: (JS) **
any
type assertion expression can only be used in .ts file**
Unexpected identifier
Upvotes: 0
Views: 630