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

Serve files via S3 only #1310

Open
hyperdefined opened this issue Nov 17, 2024 · 1 comment
Open

Serve files via S3 only #1310

hyperdefined opened this issue Nov 17, 2024 · 1 comment
Labels

Comments

@hyperdefined
Copy link

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
Allow via the S3 extension to store files from S3 instead of locally. Instead of storing files locally, upload them to S3 only (including thumbs). Add the option for "root S3 domain" that will be used to serve files. For example, my S3 bucket domain can be uploads.mysite.com and all uploads will be hosted there rather than locally. This can help with storage.

Describe alternatives you've considered
Editing the source myself to force serve images via my S3 domain.

@shish shish added the Feature label Dec 10, 2024
@shish
Copy link
Owner

shish commented Dec 10, 2024

I'm unlikely to priorotise this myself, but PRs would be welcome if they can do it without negative side-effects - some ideas that come to mind:

  • add a "delete after upload" checkbox to the S3 extension
  • more documentation for image_ilink / image_tlink settings (you shouldn't need to edit the source to serve images via s3, there's a config option for that, in the advanced section)
  • figure out how to not-break all the extensions which assume files will be available on the local disk
    • Image::get_image_filename() is the central point here - it currently returns a filename of a file on disk, so either that'd need to download the file from S3 to be on the local drive temporarily, or it returns a URL (but then every bit of code which currently works with files needs to handle URLs)

Personally if I were doing this, my first instinct would be to mount the S3 bucket as a FUSE filesystem in data/thumbs and data/images 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants