import Amplify, { Storage } from 'aws-amplify'
import config from './aws-exports'
Amplify.configure(config);
saveFile = async () => {
const { file } = this.state
await Storage.put(file.name, file)
console.log('successfully saved file...')
}
<input
type="file"
onChange={upload}
/>
Unhandled Rejection (Error): Network Error ./node_modules/@aws-amplify/storage/lib-esm/providers/axios-http-handler.js/AxiosHttpHandler</AxiosHttpHandler.prototype.handle
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://zanjmob03dfe5b3e56e45e295a1a272470ca517233002-dev.s3.ap-south-1.amazonaws.com/public/Screen%20Shot%202021-05-13%20at%201.01.43%20PM.png?x-id=PutObject. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
[ERROR] 06:08.429 axios-http-handler Error: Network Error