storage icon indicating copy to clipboard operation
storage copied to clipboard

Add `file_metadata` field to objects schema

Open bombillazo opened this issue 5 months ago • 24 comments

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.

bombillazo avatar Feb 15 '24 02:02 bombillazo

@bombillazo I generally agree that allowing Storing arbritary metadata could be a nice feature to have in Storage. Will add this on the roadmap! 🎉

fenos avatar Feb 19 '24 10:02 fenos

strong agree on adding custom metadata per storge object. Having to maintain a mirror table just for additional data is a pain, especially the lack of usable triggers to keep both sides in sync.

logemann avatar Mar 25 '24 16:03 logemann

+2 for this. I would definitely like this. would like to tag files that are being uploaded.

dmbr0 avatar Mar 27 '24 18:03 dmbr0

+1

Razikus avatar Mar 28 '24 22:03 Razikus

+1 for this

zhanziyang avatar Mar 29 '24 01:03 zhanziyang

Also +1

joe-ashwell avatar Apr 01 '24 03:04 joe-ashwell

Would make multi tenant systems a lot easier to manage. Ie. tenants quota. | +1

oleva avatar Apr 05 '24 08:04 oleva

+1

lecramr avatar Apr 05 '24 14:04 lecramr

+1000000000

I'm currently having to add metadata into my file names, so would love to clean up this mess!

danvoyce avatar Apr 18 '24 09:04 danvoyce

+1 for this. I'm currently working with AI generated images and need to store the prediction parameters that generated each image. Otherwise I gotta use AWS S3 cuz I know they have metadata feature.

momongah avatar Apr 23 '24 00:04 momongah

+1

KindArt avatar Apr 25 '24 17:04 KindArt

+1 looking forward to this

ykoitzsch avatar Apr 30 '24 18:04 ykoitzsch