Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

getAttachment(pageId, attachmentName)

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue

Returns CAttachment with the following fields: id, pageId, spaceKey, version, creationDate, lastModificationDate, size, name.

Returns CAttachment with the following fields: id, pageId, spaceKey, version, creationDate, lastModificationDate, size, name.

...

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

pageId

Number

Yes

The ID of the page the file is attached to.

attachmentName

String

Yes

Attachment name.

Return Type

CAttachment

Returns CAttachment if the attachment was found and returns null if the page/attachment is missing.

...

Code Block
languagejs
CAttachment attachmentInfo = getAttachment(11800, "attachment.txt");
return attachmentInfo.name;

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "attachment_routines" and space = currentSpace ( )
labelsarray_routines