Skip to content
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

Images cannot be viewed using Google Storage #5165

Closed
1 task done
mikenuko opened this issue Oct 1, 2017 · 2 comments
Closed
1 task done

Images cannot be viewed using Google Storage #5165

mikenuko opened this issue Oct 1, 2017 · 2 comments

Comments

@mikenuko
Copy link

mikenuko commented Oct 1, 2017

Referencing to issue #1110, I deployed a Mastodon instance of which using Google storage.

The following is some lines from my configuration file:

S3_ENABLED=true
S3_BUCKET=[domain.test.com]
AWS_ACCESS_KEY_ID=[Google Storage ID]
AWS_SECRET_ACCESS_KEY=[Google Storage Key]
S3_ENDPOINT=https://storage.googleapis.com
S3_REGION=asia
S3_PROTOCOL=https
S3_HOSTNAME=[domain.test.com]

With this configuration file, the Mastodon instance can upload images to the bucket successfully.
But the link in the toot input box is the link to the base domain and previews of the image is not working properly.

All other images are linked to https://domain.test.com/domain.test.com/system/media_attachments/files/... and all of them cannot be loaded successfully since they are uploaded to https://domain.test.com/system/media_attachments/files/...


  • I searched or browsed the repo’s other issues to ensure this is not a duplicate.
@mikenuko mikenuko changed the title Issue on support with Google Storage Images cannot be viewed using Google Storage Oct 1, 2017
@nightpool
Copy link
Member

nightpool commented Oct 1, 2017

If you're expecting to serve images from a custom domain, you should set S3_CLOUDFRONT_HOST to the domain you're serving from, I believe.

@mikenuko
Copy link
Author

mikenuko commented Oct 2, 2017

Thanks for pointing out this configuration item, after changing S3_HOSTNAME to S3_CLOUDFRONT_HOST, everything resumed normally.

@mikenuko mikenuko closed this as completed Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants