Skip to content

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

@ThisIsMissEm

Description

@ThisIsMissEm

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions