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

[feature] Custom prefix (or subfolder) for s3 #1371

Open
xnuk opened this issue Jan 22, 2023 · 1 comment
Open

[feature] Custom prefix (or subfolder) for s3 #1371

xnuk opened this issue Jan 22, 2023 · 1 comment
Labels
config Something needs to be made configurable, or there's a config issue enhancement New feature or request storage/media Issues related to how we store and serve media

Comments

@xnuk
Copy link
Contributor

xnuk commented Jan 22, 2023

Assume that I have:

  • a instance named example.com
  • a general media bucket named s3://my-media-bucket
  • a CDN named https://media.example.com, pointing the s3://my-media-bucket.

Looks like GoToSocial stores images in like 01AAAAAAAAAA/attachment/original/01BBBBBBBB.png. Let's call it apple.png for short.

So I want:

  • media addresses in my posts are shown like https://media.example.com/gotosocial/apple.png
  • which points s3://my-media-bucket/gotosocial/apple.png

But actual:

  1. Cannot make GoToSocial to save images in bucket's subfolder - /gotosocial/ in this case.
    • tried storage-s3-bucket: my-media-bucket/gotosocial, but GoToSocial says "Bucket name contains invalid characters".
  2. Cannot make media addresses to use media.example.com
    • storage-s3-proxy: false -> https://s3.dualstack.ap-northeast-2.amazonaws.com/my-media-bucket/apple.png
    • storage-s3-proxy: true -> https://example.com/fileserver/apple.png

Currently workaround:

  1. Make a new bucket s3://my-media-bucket-gotosocial and make the CDN points there
    • https://media.example.com/gotosocial/* -> s3://my-media-bucket-gotosocial/*
    • The problem is: I don't know how
  2. storage-s3-proxy: true and make nginx/caddy redirects to CDN

Problem 2 maybe duplicates of #1026.

Feel free to feedback or edit this issue, because I have poor English writing skills.


Opened issues related with AWS S3

@tsmethurst tsmethurst added enhancement New feature or request config Something needs to be made configurable, or there's a config issue labels Jan 23, 2023
@kkbt0
Copy link
Contributor

kkbt0 commented Aug 5, 2023

#1458 mentioning that the reason for using s3 pre-signed instead of CDN is to restrict access to object storage.
Is there a definite plan to implement this feature ? Or will it not?

@daenney daenney added the storage/media Issues related to how we store and serve media label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config Something needs to be made configurable, or there's a config issue enhancement New feature or request storage/media Issues related to how we store and serve media
Projects
None yet
Development

No branches or pull requests

4 participants