Skip to content

storage.list() does not return custom file metadata (only system fields) #759

@thewh1teagle

Description

@thewh1teagle

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When uploading a file with custom metadata (e.g. metadata: { filename: "My Real Filename.txt" }), the .list() method only returns system metadata fields (eTag, size, mimetype).
Custom metadata is not included, even though it is stored correctly in storage.objects (and retrievable via .info()).

To Reproduce

Steps to reproduce:

  1. Upload a file with custom metadata:

    const { data, error } = await supabase.storage
      .from("bucket")
      .upload("path/file.txt", file, {
        metadata: { filename: "My Real Filename.txt" },
      });
  2. List files:

    const { data } = await supabase.storage.from("bucket").list("path");
    console.log(data[0].metadata); // only shows system fields, no custom filename
  3. Fetch file info:

    const info = await supabase.storage.from("bucket").info("path/file.txt");
    console.log(info.data.metadata); // shows custom fields as expected

Expected behavior

storage.list() should return both system and custom metadata, not just system fields.
This would avoid needing N .info() calls for N files, which has a significant performance impact.

System information

  • OS: macOS
  • Browser: Chrome
  • supabase-js: 2.50.0
  • Node.js: v22.18.0

Additional context

Confirmed that custom metadata exists in storage.objects.
.info() retrieves it correctly, but .list() omits it.
This looks like a storage server issue rather than a storage-js issue.

It would also be very useful to have a first-class way to update custom user metadata after upload (for example, renaming the filename field in metadata without re-uploading the file).

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