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

Rework tables that store uploads to contain the object key #124

Open
ThisIsMissEm opened this issue Feb 23, 2025 · 1 comment
Open

Rework tables that store uploads to contain the object key #124

ThisIsMissEm opened this issue Feb 23, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@ThisIsMissEm
Copy link
Contributor

Currently when we process uploads or receive incoming media we only store a url for that media.

So for instance for accounts, we store:

  • avatar_url
  • cover_url

For media, we store:

  • type
  • url
  • width
  • height
  • thumbnail_type
  • thumbnail_url
  • thumbnail_width
  • thumbnail_height

For custom emojis, we store:

  • url

Given these properties, it's not possible to know whether the media is stored in our uploads (s3 / fs) or whether the media comes from a remote source. Additionally, if it is stored in our uploads, we don't store the key for the file, which is necessary when performing deletions of uploaded files.

We probably want to move towards a schema like:

  • avatar_key (nullable)
  • avatar_remote_url (nullable)

Where _key refers to the file in our storage, and _remote_url is for media stored on other servers.

@ThisIsMissEm
Copy link
Contributor Author

We may additionally also want to store the blurhash of media

@dahlia dahlia added the enhancement New feature or request label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants