Skip to content

Minio Implementation for Amazon S3 #1195

Description

@armouredking

Describe the feature you'd like
Bookstack does not apparently allow you to set a URL for S3. I'm not 100% certain about the STORAGE_URL field, but given the Laravel logs I have to assume it does not do what I'm thinking it would/should.

Describe the benefits this feature would bring to BookStack users
Minio is a compatible stack, and given that quite a few people using BookStack will be self hosted, supporting Minio should be implemented. And it should be fairly easily done. RocketChat accomplishes this simply by allowing you to specify the link (instead of trying to magic it into existence as it seems is currently done).

Additional context
Log entry:

[2018-12-23 02:28:23] production.ERROR: Encountered a permanent redirect while requesting https://bookstack.s3.us-west-1.amazonaws.com/?prefix=uploads%2Fimages%2Fuser%2F2018-12-Dec%2Ftest.jpg%2F&max-keys=1&encoding-type=url. Are you sure you are using the correct region for this bucket? {"userId":1,"email":"admin@admin.com","exception":"[object] (Aws\\S3\\Exception\\PermanentRedirectException(code: 0): Encountered a permanent redirect while requesting https://bookstack.s3.us-west-1.amazonaws.com/?prefix=uploads%2Fimages%2Fuser%2F2018-12-Dec%2Ftest.jpg%2F&max-keys=1&encoding-type=url. Are you sure you are using the correct region for this bucket? at /var/www/html/vendor/aws/aws-sdk-php/src/S3/PermanentRedirectMiddleware.php:49)
[stacktrace]

.env File:

# Storage
STORAGE_TYPE=s3
# Amazon S3 Config
STORAGE_S3_KEY=ihaveaworkingkeyhere
STORAGE_S3_SECRET=andaworkingsecrethere
STORAGE_S3_REGION=us-west-1
STORAGE_S3_BUCKET=bookstack
# Storage URL
# Used to prefix image urls for when using custom domains/cdns
STORAGE_URL=https://bucket.trustmeit.exists/bookstack

Entries are of course sterilized. Similar entry / Relevant information: #1192 and Rocket.Chat Documentation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions