I am using active storage (on s3) for saving resources of my app (rails). i need generate url for existing images with changed size - i used for it - Rails.application.routes.url_helpers.rails_representation_url(column.variant(resize: '250x250').processed, only_path: true, disposition: :inline)
But in this peace of code - column.variant(resize: '250x250').processed
returns
Aws::S3::Errors::Forbidden (Aws::S3::Errors::Forbidden)
backet policy
{
"Version": "2012-10-17",
"Id": "Policy*****4140",
"Statement": [
{
"Sid": "Stmt*******38628",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": [
"arn:aws:s3:::my_project/*"
]
}
]
}
How can i fix it?