pixelfed / ideas

Issues board used for Pixelfed suggestions
8 stars 1 forks source link

Feature Request: Bring Your Own Object (S3) Storage #96

Open alpha1 opened 3 months ago

alpha1 commented 3 months ago

I'd like to suggest an idea and would be willing to help in the development of it or potentially someday submit a pull request for it, to add a per-user option to bring your own S3 storage.

I imagine this would be a set of 4 or so fields hidden behind a toggle or other gate inside of a user's settings that allows them to save their own S3 credentials and upload future photos and video to their own storage.

This has several advantages:

  1. Reduced cost for server admins who can allow heavy users to stay and reduce their burden on the instance admins, providing another way to help support instance admins.
  2. Provider users with potentially more options for data ownership, backup and portability.
  3. Allow users to upload larger files, as long as they don't sink the server
  4. Provide more customization without having to host your own server, which isn't possible for many users.

I would imagine this would be a fairly large feature needing a few things to work fully, however, I am not familiar with the Pixelfed codebase.

  1. User settings that check and save credentials
  2. additional logic to check for and change credentials/paths of files, potentially with checks to make sure the file(s) are still accessible.
  3. Provide an option to define the maximum file upload size for
  4. Potentially add preload scripts on profiles for this new domain
  5. Potentially add a migrate option to migrate existing media
Wild1145 commented 2 months ago

Given the technical hurdle to entry as it were with understanding S3 much less using it, do you think it's likely someone would want to provide S3 credentials but not just run their own site? Given the person hosting the site itself is still going to need to process and serve this content even if it is backed by someone else's file storage, there's still a lot of compute and bandwidth required, meaning larger files for example would probably still be something you'd want to disable given you're not really likely to see a cost difference otherwise?