I've follow the documentation to install / configure correctly S3 Adapter - Watch the Youtube video related to the previous version and impossible for me to upload a file.
{
"Version": "2012-10-17",
"Id": "Policy1562237059980",
"Statement": [
{
"Sid": "Stmt1562237050057",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:ListBucket",
"s3:GetObject",
"s3:GetObjectAcl",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:ReplicateObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::orchard-emblem",
"arn:aws:s3:::orchard-emblem/*"
]
}
]
}Upload a file correctly on S3
Always got an error on upload. Think I've miss something in my configuration
Configuration
'storage' => [
'adapter' => 's3',
'key' => 'AKIA3ONIZBWFZE56QHGO',
'secret' => '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',
'bucket' => 'orchard-emblem',
'version' => 'latest',
'region' => 'us-west-1',
'options' => [
'ACL' => 'public-read',
'Cache-Control' => 'max-age=604800'
],
'root' => '/stbarths',
'thumb_root' => '/stbarths/thumbnails',
'root_url' => 'https://orchard-emblem.s3-us-west-1.amazonaws.com'
],
...
@albanallee
I am getting below error with your Bucket Policy in my bucket.
Policy has invalid resource
Can you give it a try without any Bucket Policy?
By removing the Policy, I've got the same error :/ @hemratna
@hemratna : The only way to make it works regarding your comment is to switch all permissions to "Off" on my bucket as below :
@albanallee Yes, I just check mine permission and looks the same as you suggest.
Directus uses https://github.com/thephpleague/flysystem So I think this might be something related to flysystem.
Can we close this issue?
Yep for sure. Thanks for your support @hemratna ;)
@hemratna — should we open a ticket over on flysystem so maybe this gets resolved?
@benhaynes I will run a test on local and raise a ticket with flysystem.
I am following all of @hemratna 's steps, until up to the switching off all the bucket permissions, and I'm still getting 'No permission to write: ...' error.
@1zaak Can you please try with a new bucket?
@hemratna Works now after I created a new bucket
Hi Folks,
the latest version has this bug.
I removed all permission to make this work, which is not ideal because we do have an access and secret key.
Most helpful comment
@hemratna : The only way to make it works regarding your comment is to switch all permissions to "Off" on my bucket as below :