Attachment Supplier

Overview

Supplies information about attachments in Confluence.

Key names are case-sensitive. That is, you must supply a key of "id" rather than "ID".

You can also use any key from the Content Supplier using the 'attachment:' prefix. For example, you can use 'attachment:id', instead of 'content:id', even though 'id' is not listed explicitly below.

Details

Name:

Attachment Supplier

Prefix:

attachment

(optional)

Supported Content:

Attachments

Provided By:

Supported Keys

The following are the list of keys which this supplier will return a value for.

Key

Content Types

Return Type

Description

download path

Attachments

The path to the download location for the attachment.

file name

Attachments

The file name of the attachment.

file size

Attachments

The length of the file in bytes.

nice file size

Attachments

The length of the file, described in bytes, kilobytes or megabytes, depending what makes the most sense.

content type

Attachments

The content (MIME) type.

comment

Attachments

The attachment comment text.

attached to

Attachments

The content the attachment is attached to. Likely to be a Page or News item.

attachment version

Attachments

The attachment version number.

space

Attachments

The space the attachment is in.

thumbnail path

Attachments

The path to the "thumbnail", if the attachment is an image.

Inherited Keys

The following keys are inherited from other suppliers, but will work using the same prefix ('attachment:') as this supplier.

From Content Supplier

KeyContent TypesReturn TypeDescription

id

All

Number

The unique identifier for the content.

title

All

Text

The title of the content.

type

All

Text

The name of the content type. e.g.: "Page" or "News".

url

All

Text

The server-relative URL to view the content.

creator

All

User

The user who created the content.

creation date

All

Date

The date the content was created.

modifier

All

User

The user who most recently modified the content.

modification date

All

Date

The date the content was most recently modified.

icon

All

Text

The server-relative URL of the icon for this content type.

space

All

Space

The space the content exists in. If the content is itself a space, the space is returned.

excerpt

Pages, news items, space descriptions

Text

The excerpt for the content. (Inheritance is not valid with Attachment Supplier.)

body

Pages, news items, space descriptions, comments

Text

The main body text of the content. (Inheritance is not valid with Attachment Supplier.)

labels

Pages, news items, space descriptions

List of Labels

A list of the labels attached to this content. (Inheritance is not valid with Attachment Supplier.)

attachments

Pages, news items

List of Attachments

A list of the attachments on the supplied content.

incoming links

Pages, news items

List of Links

A list of links to content which links to the supplied content. (Inheritance is not valid with Attachment Supplier.)

outgoing links

Pages, news items

List of Links

A list of links to content which the supplied content links to. (Inheritance is not valid with Attachment Supplier.)

summary

Content

Text

Either the excerpt (as above), if it exists, or a short summary of the page content if it does not. (Since 1.3)

(Inheritance is not valid with Attachment Supplier.)

equals [X]

Content

Boolean

Tests if the current context is equal to that specified by X, where X is a standard link to Confluence content.

Examples:

  • equals My Page - compares to 'My Page' in the current space.
  • equals @self - compares to the current context.
  • equals @parent - compares to the parent page of the current context.
  • equals ^attachment.ext - compares to the file attached to the current page.
  • content:equals KEY:Page - compares to a page in another space.

The 'content:' prefix is required for tests on pages in other spaces, due to the ':' character in the value.

version

Content

Number

The version number for the content.

version comment

Content

Text

The comment about the version, as set by the editor. (Since 2.1.0)

(Inheritance is not valid with Attachment Supplier.)

version history

Content

List of Content

The list of historical versions for the current content object. The most recent version will be listed first. (Since 2.1.0)

is latest version

Content

Boolean

Checks if the content is the latest version.

latest version

Content

Content

Returns the latest version of the content. May be the same content if this is the latest version.

images

Pages, News Items

List of Attachments

(Since 3.2.0) The list of attachments which are image files.