-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is the "accept" prop even being used? Where can we find a list of valid prop arguments? (Duplication of #220) #227
Comments
I've been on this for a couple hours now and need some help. Earlier, I kept dealing with CORS issues, even those they are allwed in my server. Is there any bucket settings that I have to change? I already have it made it so that I can read and write to it. :( Here is what my config looks like: const s3 = new AWS.S3({
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
region: 'us-east-1',
s3ForcePathStyle: true,
signatureVersion: 'v4',
headers: { 'Access-Control-Allow-Origin': '*' },
});
const getS3 = () => s3;
const s3Service = new S3Router({
bucket: process.env.BUCKET_MP3,
ACL: 'public-read',
getS3,
}); And then my component: <ReactS3Uploader
server='http://localhost:1469'
signingUrl='/s3/sign'
accept='.mp3,.m4a'
onError={(e) => {
console.log('onError: ');
console.log(e); // "XHR Error"
}}
onProgress={(progressInPercent, uploadStatusText) => {
console.log('onProgress');
console.log('progressInPercent', progressInPercent);
console.log('uploadStatusText', uploadStatusText);
}}
onFinish={(uploadDetails) => {
console.log('onFinish: ', uploadDetails);
}}
onSignedUrl={(signature) => {
console.log('onSignedUrl:', signature); // This works
}}
/> |
Yeah, would be nice if any of these S3 types of libraries gave some resources on setting up the S3 stuff. It turns out I did have to edit CORS settings of the S3 bucket. It may seem obvious, but I thought that since it wasn't mentioned here (and various other tools achieving the same affect) that it was not neccesary. Here is the CORS config that eventually got me rolling.
You should change ...
"AllowedOrigins": [
"https://your-domain.com"
], |
The props are named really well, but I think it will still be useful to have a table. If you give me a rough list of definitions, I can create a table in the README.
I am still trying to figure out what the heck to put for
accept
if I am uploading mp3 files. In fact, I looked through the source code and I could find it being used anywhere (only the.ts
file, but it serves no functionality).Here are other cases where this table could be useful:
The text was updated successfully, but these errors were encountered: