Getting CORS error on uploading file on AWS S3
abhimanusharma opened this issue · comments
Here is my jsx code:
<ReactS3Uploader
getSignedUrl={props.getSignedUrl}
accept="image/*"
onProgress={onProgress}
onError={onError}
onFinish={onFinish}
uploadRequestHeaders={{
'x-amz-acl': 'public-read'
}}
contentDisposition="auto"
/>
Here is my method:
getSignedUrl = async (file, callback) => {
const { dispatch } = this.props;
const params = {
objectName: file.name,
contentType: file.type
};
const response = await dispatch(getSignedUrl(params));
console.log(response);
callback(response);
}
The above dispatch method is getting signed url from my NestJs server.
@abhimanusharma were you able to solve this?
@abhimanusharma @mclean25 any updates?
Also getting a cors issue when uploading, it would be good to know if there is something wrong or it's just something in the server settings