I try to upload file to my s3 bucket use this library https://github.com/Fausto95/aws-s3 and I get this error in the console:
this is code of component:
<template>
<input type="file" @change="uploadFile(fieldName, $event.target.files)"/>
</template>
<script>
import S3 from 'aws-s3';
export default {
computed: {
config() {
return {
bucketName: 'in-converter-bucket',
dirName: '', /* optional */
region: 'eu-west-2',
accessKeyId: 'AKIAZSUESKSZVZTI55PV',
secretAccessKey: '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',
s3Url: 'https://s3.console.aws.amazon.com/s3/buckets/in-converter-bucket?region=us-west-2&tab=objects', /* optional */
}
},
S3Client() {
return new S3(this.config);
}
},
methods: {
uploadFile(fieldName, files) {
let file = files[0]
this.S3Client
.uploadFile(file, '324')
.then(data => console.log(data))
.catch(err => console.error(err))
}
},
props: ['fieldName', 'obj']
}
</script>
Any help will be very useful
