The Image Field is responsible for storing a path to an uploaded image. The property imageFile
contains information about the image which is embedded in the form. It is a File
property type and has the following properties:
id
- Theid
to a uploaded file to theFiles
endpoint.link
- A downloadablelink
to that file's location in storage.
The Image Field also may contain a reference to the original, un-scaled image which was captured in the image field. This property is called "retainedImage". It is also a File
property type and has the same properties as the imageFile
property. This property cannot be set through the API and will be removed if the imageFile
property is set through the API.
NOTE:The
link
properties are read-only and will not be persisted if updated.
{
"Image": {
"imageFile": {
"id": "58078f6c-964c-4b27-96b5-a46c01094f2b",
"link": "https://api.goformz.com/v2/files/58078f6c-964c-4b27-96b5-a46c01094f2b"
},
"retainedImage" : {
"id":"23452345-87sd-9876-8976-kj773493487",
"link":"https://api.goformz.com/v3/files/23452345-87sd-9876-8976-kj773493487"
},
"id": "fbbd61f4-fbb8-4fb4-8207-a46c0108d3ca",
"name": "Image",
"type": "Image"
}
}
NOTE:The id, name, and type are not necessary when setting or updating the Image Field. These properties are returned in the JSON of the request for readability.
The Image Field requires uploading a File
first and then assigning that uploaded file's id
with the imageFile > id
property. For more details see the section: "Uploading a file".