BookStack: v23.06.2 Upload images to s3 doesn't work
Describe the Bug
The error is "File path /updates/images/gallery/{image_name} could nto be uploaded to. like https://github.com/BookStackApp/BookStack/issues/2739
Steps to Reproduce
my poilicy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1420044805001",
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:GetObject",
"s3:GetObjectAcl",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:ReplicateObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::my-bookstack",
"arn:aws:s3:::my-bookstack/*"
]
}
]
}
- Go to any document
- Edit the document
- Click on “insert an image” and drag and drop an image to upload it
- See error
- Check s3 bucket
- But the image already uploaded to s3
Expected Behaviour
it shouldn’t error
Screenshots or Additional Context
Browser Details
No response
Exact BookStack Version
v23.06.2
PHP Version
8.2
Hosting Environment
Docker
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 2
- Comments: 17 (5 by maintainers)
Try this hack to avoid that line.
Yeah,
STORAGE_S3_ENDPOINTwill be region dependent, if setting manually for AWS.From my view, this should work though. Happy to hear from anyone more experienced with AWS what might be required here, and why this appears to work for me but not others (Specifically this is the action of setting ACLs to make images public), especially as from the above it has been shown to be failing for those with
PutObjectAclpermissions.@oxismailxo Need to add the region aswell - “https://s3.eu-west-2.amazonaws.com” works for me