Resource component
  • 28 Nov 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Resource component

  • Dark
    Light

Article Summary

To access resources in the configurator, it is also necessary to store them in a component. There are the following 4 resource types that can be uploaded:

  • Image - e.g. product images
  • JavaScript - Custom code which should be executed additionally when opening the configurator.
  • Document - e.g. PDF
  • 3D Assets - 3D models or environment files

If a configurator offers the possibility to individualize the product by uploading a custom image, it is necessary that the option "User can upload his own resources" is activated. User uploads are stored in a separate resource component just like normal product images.

Properties

NameDescription
urlurl to the resource 
widthwidth of the resource (available for image resource) 
heightheight of the resource (available for image resource) 
typedatatype of the resource (e.g png, available for image, document and 3D asset resource)
sizesize of the resource 
dpixresolution x (available for image resource)  
dpiyresolution y (available for image resource) 

Value

When referring to a resource, in another value component for example, you get all the properties for the resource. The example below reprensents an image resource.

{ 
  "Url": "https://combeepublic.blob.core.windows.net/resources/0C6fxtWT3dA.png",
  "Width": 3040,
  "Height": 2943,
  "Type": "Png",
  "Size": 135915,
  "DpiX": 118.11,
  "DpiY": 118.11
}

Was this article helpful?