Skip to content

Function: getAttachmentContent() ​

ts
function getAttachmentContent(
   client, 
   parameters, 
   options?
): Promise<ArrayBuffer | ArrayBufferView<ArrayBufferLike>>;

Defined in: src/cloud/api/issueAttachments.ts:38

Returns the contents of an attachment. A Range header can be set to define a range of bytes within the attachment to download. See the HTTP Range header standard for details.

To return a thumbnail of the attachment, use Get attachment thumbnail.

This operation can be accessed anonymously.

Permissions required: For the issue containing the attachment:

  • Browse projects project permission for the project that the issue is in.
  • If issue-level security is configured, issue-level security permission to view the issue.
  • If attachments are added in private comments, the comment-level restriction will be applied.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ id: string; redirect?: boolean; }-
parameters.idstringThe ID of the attachment.
parameters.redirect?booleanWhether a redirect is provided for the attachment download. Clients that do not automatically follow redirects can set this to false to avoid making multiple requests to download the attachment.
options?RequestOptions-

Returns ​

Promise<ArrayBuffer | ArrayBufferView<ArrayBufferLike>>