-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
v23.06.2 Upload images to s3 doesn't work #4420
Comments
Hi @yoghiyb, |
sure, @ssddanbrown |
@yoghiyb Thanks, unfortuantely that cuts off some important lines. |
@ssddanbrown sorry for the previous mistake, this is the full log that i regenerated with a different file Details
|
@ssddanbrown any update for this? |
@yoghiyb No. I'd need to test and attempt to replicate on S3. Not sure when I'll get round to that. |
@yoghiyb please did you find any solution? Thanks. |
I've just tested AWS S3 usage on my dev instance (BookStack ~v23.08). All appears to work as expected. I get that there are a lot of options and variation within S3 that could cause different behaviour though. |
@ssddanbrown thank you for your intervention & time, here is my S3 config: 1- Permissions -> Bucket policy: { NOTE-1: images are uploaded successfully to S3 but the error shows up: NOTE-2: When I upload attachments the error doesn't show up! I hope this information helps. Thank you again @ssddanbrown ! |
The upload is failing here: https://github.com/BookStackApp/BookStack/blob/development/app/Uploads/ImageService.php#L220 If you comment out that line - upload works as expected. |
Try this hack to avoid that line.
|
@robertjustjones adding STORAGE_S3_ENDPOINT=https://s3.amazonaws.com not worked for me ! |
@oxismailxo |
Yeah, 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 |
Thank you so much @Joespink ! finally worked for me after adding STORAGE_S3_ENDPOINT=https://s3.eu-west-1.amazonaws.com/, thank you, everyone! |
That makes sense, since AWS defaults all S3 buckets to private by default now, and if you have a policy in place to disable public sharing (instead sharing the data through a cloudfront endpoint), it could cause it to error out. |
i can confirm digital ocean spaces (s3 compatible) is also set permission to private as default, any easy workaround for this? somehow i can connect by using this url structure: STORAGE_S3_ENDPOINT=https://(region).digitaloceanspaces.com |
Describe the Bug
The error is "File path /updates/images/gallery/{image_name} could nto be uploaded to.
like #2739
Steps to Reproduce
my poilicy
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
The text was updated successfully, but these errors were encountered: