Skip to main content

generic_file

A file from a file_reference type metafield that is neither an image or video.


Tip

To learn about metafield types, refer to Metafield types.


Properties

The alt text of the media.

The ID of the file.

The media type of the model. Always returns generic_file.

The position of the media in the product.media array.

If the source is a file_reference metafield, then nil is returned.

Anchor to
preview_image

A preview image for the file.

The CDN URL for the file.

{
"alt": null,
"id": 21918386454593,
"media_type": "generic_file",
"position": null,
"preview_image": {},
"url": "//polinas-potent-potions.myshopify.com/cdn/shop/files/disclaimer.pdf?v=9043651738044769859"
}
Was this section helpful?