Customer Account UI Extension: feature request for filename and extension on file references

Hi Shopify team,

Could Shopify expose readable filenames and file extensions on files returned by file_reference and list.file_reference metafields?

The use case is a customer-account extension displaying a list of downloadable documents, with a filename such as Installation guide.pdf and the extension pdf available separately. This is a feature request, not a docs/runtime mismatch.

Environment

  • Surface: Customer Account UI Extension
  • Target: customer-account.order-status.block.render
  • @shopify/ui-extensions: 2026.4.3
  • Extension api_version: 2026-04
  • Runtime: customer account web extension

What the docs expose

Storefront GenericFile includes the file’s “URL, MIME type, size in bytes, and an optional preview image,” but no filename or extension. Customer Account GenericFile has the same limitation.

Admin Video.filename already exposes “The video’s filename,” but this is not available on Storefront/Customer Account videos or on generic files and images.

Minimal repro

The second query intentionally selects proposed, currently unsupported field names to illustrate the missing metadata.

import '@shopify/ui-extensions/preact';
import { render } from 'preact';

export default async function Extension() {
  render(<s-text>File metadata check</s-text>, document.body);

  const id = 'gid://shopify/GenericFile/REPLACE_WITH_FILE_ID';

  await Promise.all(
    ['', 'filename fileExtension'].map(async (fields) => {
      const response = await fetch('shopify:storefront/api/graphql.json', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({
          query: `query FileMetadata($id: ID!) {
            node(id: $id) {
              ... on GenericFile { id url mimeType ${fields} }
            }
          }`,
          variables: { id },
        }),
      });

      console.log(fields || 'Existing fields', await response.json());
    })
  );
}

Steps

  1. Upload a PDF under Content > Files and reference it from a list.file_reference metafield accessible to the extension.
  2. Enable api_access = true, replace REPLACE_WITH_FILE_ID with that file’s ID, and run the extension.
  3. The first query selects supported fields: id, url, and mimeType.
  4. Adding filename and fileExtension fails GraphQL schema validation because those fields are not defined on GenericFile.

Expected support

  • Readable filename and extension fields, such as filename and fileExtension, on the file types returned by Storefront and Customer Account metafield references, including generic files, images, and videos.
  • Equivalent Admin GraphQL support for generic files and images, so this metadata is available consistently.
  • A documented distinction between the original uploaded filename and the current merchant-renamed filename, including which name the extension describes.

The same metadata should be available whether the file comes from a single reference or an item in a list reference.

Current limitation

The documented file objects do not provide this metadata consistently. A CDN URL’s basename is not guaranteed to preserve the uploaded name, especially for processed videos, and mimeType does not identify the exact filename suffix, such as .jpg versus .jpeg.

Could this metadata be exposed directly so customer-account extensions can display file names and extensions without reconstructing them from delivery URLs?

Thanks.

1 Like