Skip to content

Add file_metadata field to objects schema #439

@bombillazo

Description

@bombillazo

Feature Request

Currently, the objects schema in the Storage API schema is a light abstraction over the S3 storage. There is a metadata column in the objects table, but it corresponds to the metadata of the S3 file and cannot be used by the user. The API does not expose any way to add related metadata to a file to the objects directly. This metadata would ideally be in JSON format to contain user-determined data. Currently, the user needs to get around this limitation by either:

  • Create another table that relates this metadata to the storage.objects table. This dramatically complicates querying, migrations, and client usage for something that could be colocated within the same table.
  • Directly modify the storage schema to add this new functionality, potentially breaking compatibility with Supabase-controlled services and implementation.

The storage API should natively support metadata, and the API / JS clients should be updated to enable this powerful and common feature for file storage management. My proposal is to add a new column called file_metadata to differentiate it to the current metadata field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedAccepted for further investigation and prioritisationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions