File Mapping

This element is similar to a Parameter Mapping but it is used for a special case when the posted data to the API is a file. It provides additional information about the file’s metadata.

You can only store files using Workflow Page APIs. You will need to pass all the file details to individual input contexts of the workflow and connect them using an XSLT transformation before saving.

Attributes

FileInfoType

Selects which type of information about the file will be passed to the parameter specified using the Name attribute of the mapping.

FileContent - The actual file content will be passed to the parameter.

FileName - file name will be passed to the parameter.

FileSize - file size will be passed to the parameter.

ContentType - file's content type will be passed to the parameter.

ThumbnailHeight Height of a thumbnail. If Height and Width are 0 the complete image will be passed.
ThumbnailWidth Width of a thumbnail.

Storing Thumbnails

You can easily store uploaded image thumbnails in a separate database column together with the full image. To do this you need to:

  • Pass the original image into one parameter
  • Pass a thumbnail (FileInfoType =FileContent + ThumbnailHeight + ThumbnailWidth non zero) to another parameter
  • Connect these using a transformation in a workflow to a single record and store them in separate fields.

This way you will get a record with both the full-sized image and a thumbnail.