---
title: GenericFile - Storefront API
description: >-
  Any file that doesn't fit into a designated type like image or video. For

  example, a PDF or JSON document. Use this object to manage files in a
  merchant's store.


  Generic files are commonly referenced through [file reference

  metafields](https://shopify.dev/docs/apps/build/metafields/list-of-data-types)

  and returned as part of the
  [`MetafieldReference`](/docs/api/storefront/2026-10/unions/MetafieldReference)
  union.


  Includes the file's URL, MIME type, size in bytes, and an optional preview
  image.
api_version: 2026-10
source_url:
  html: 'https://shopify.dev/docs/api/storefront/latest/objects/GenericFile'
  md: 'https://shopify.dev/docs/api/storefront/latest/objects/GenericFile.md'
api_name: storefront
api_type: graphql
type: object
---

# Generic​File

object

Requires `unauthenticated_read_product_listings` access scope.

Any file that doesn't fit into a designated type like image or video. For example, a PDF or JSON document. Use this object to manage files in a merchant's store.

Generic files are commonly referenced through [file reference metafields](https://shopify.dev/docs/apps/build/metafields/list-of-data-types) and returned as part of the [`MetafieldReference`](https://shopify.dev/docs/api/storefront/2026-10/unions/MetafieldReference) union.

Includes the file's URL, MIME type, size in bytes, and an optional preview image.

## Fields

* alt

  [String](https://shopify.dev/docs/api/storefront/latest/scalars/String)

  A word or phrase to indicate the contents of a file.

* id

  [ID!](https://shopify.dev/docs/api/storefront/latest/scalars/ID)

  non-null

  A globally-unique ID.

* mime​Type

  [String](https://shopify.dev/docs/api/storefront/latest/scalars/String)

  The MIME type of the file.

* original​File​Size

  [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int)

  The size of the original file in bytes.

* preview​Image

  [Image](https://shopify.dev/docs/api/storefront/latest/objects/Image)

  The preview image for the file.

* url

  [URL](https://shopify.dev/docs/api/storefront/latest/scalars/URL)

  The URL of the file.

***

## Map

### Possible type in

* [Metafield​Reference](https://shopify.dev/docs/api/storefront/latest/unions/MetafieldReference)

***

## Interfaces

* [Node](https://shopify.dev/docs/api/storefront/latest/interfaces/Node)

  interface

***

## GenericFile Implements

### Implements

* [Node](https://shopify.dev/docs/api/storefront/latest/interfaces/Node)
