Skip to content

ProductFile

The ProductFile object represents a single file for product in the storefront.

classDiagram
  direction LR
  ProductFile --> Url
  ProductFile --> Size
  class Url{
  }
  class Size{
  }
  class ProductFile{
    int id
    string name
    string extension
    string description
    Url url
    Size size
  }

Properties

Attribute name Type Description
id int The unique identifier of the file.
name string Name of the file.
extension string Extension of the file.
description string Description of the file.
url Url The Url object of the file.
size Size The Size object of the file.

Examples

id property

{{ productFile.id }}
1

name property

{{ productFile.name }}
Example name

extension property

{{ productFile.extension }}
pdf

description property

{{ productFile.description }}
Example description

url property

{{ productFile.url.relative }}
/url/to/product/file

size property

{{ productFile.size.humanReadable }}
150 MB