attachment-data

{attachment-data}

Plugin: Scaffolding Plugin, from version 2.3-dr6

A macro which allows the user to select or upload an attachment.

Usage

{attachment-data:Name|include=<regular expression>|exclude=<regular expression>}

Parameters

Name Required Default Description
[default]/key
The name or key of the data field.
include
Only include file names which match the specified regular expression.
exclude
Exclude any file names which match the specified regular expression.

Note
This plugin stores the attachment value as a Reference pointing at an Attachment, the same as the attachment-options macro. As such, if you are using a version of Scaffolding prior to 3.2.0 you will have to 'de-reference' it by adding '> reference:value' to your keychain when accessing it via Reporting. Eg:
{attachment-data:My Attachment|include=.*gif}
{report-info:data:My Attachment > reference:value > attachment:file name}

Examples

Displaying an attachment as an image

Below describes how to display an attachment data upload as an image using the Reporting Plugin.

|| Image File: | {attachment-data:Image|include=.*gif,.*jpg} |
|| Image Display: | {report-image:data:Image > reference:value > attachment:download path} |

You can also combine this with the hidden-data macro to only display the attachment link in edit mode.

|| Image: | {hidden-data}
{attachment-data:Image|include=.*gif,.*jpg}
{hidden-data} {report-image:data:Image > reference:value > attachment:download path}  |

See Also

Labels

macro macro Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.