How do I have Filepicker set the proper permissions when uploading to Amazon S3 so that the file is "public" in my s3 bucket?
You can do this by making your s3 bucket into a static website.
With Amazon, go to the Properties for the bucket. In properties, the Website tab has a checkbox to enable making your bucket a static website.
If you need all the files to be https, then you can add the following security policy to your bucket.
{
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::NAME_OF_BUCKET_HERE/*"
}
]
}
https://developers.filepicker.io/docs/web/#store
filepicker.store(input, [options], onSuccess(FPFile){}, onError(FPError){}, onProgress(percent){})
Public Access
{access: 'public'}
Indicates that the file should be stored in a way that allows public access going directly to the underlying file store. For instance, if the file is stored on S3, this will allow the S3 url to be used directly. This has no impact on the ability of users to read from the FPUrl. Defaults to 'private'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With