Skip to content

Make Storage API consistent and more useful #210

Open
@activenode

Description

@activenode

Feature request

Problem(s)

  1. Currently when uploading via supabaseClient.storage.from(bucket).upload(filePath, file) the result is the Key which seems to be Key = $bucket/$path which quite honestly is extremely unhelpful. Why not return an object like { bucket_id, path, id } ? Especially since I couldn't find anything related to this Key - it's not a primary key as to my knowledge

  2. When deleting objects via storage.from...remove we actually do get a proper result returned (even though that's weird because for deletion I would only expect a minimal version, e.g. deletionCount or just the {id} or a boolean. -> hence: inconsistent as compared to my first point and not really easy to follow up to.

  3. The storage functions should be properly documented, not just being samples in the Templates (like storage.foldername(objects.name))

  4. This last one is an architectural question / issue: i feel like the objects table is holding too much of information considering the fact that someone who "simply should be able to view an image" shouldn't be able to retrieve the created_at or metadata column necessarily. That might be none of their business, also especially looking at owner and last_accessed_at -> have you thought about making the objects table more minimal like id, bucket, name and having a related table with the other data to separate concerns?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions