pub async fn add_attachment(
configuration: &Configuration,
issue_id_or_key: &str,
) -> Result<Vec<Attachment>, Error<AddAttachmentError>>
Expand description
Adds one or more attachments to an issue. Attachments are posted as multipart/form-data (RFC 1867). Note that: * The request must have a X-Atlassian-Token: no-check
header, if not it is blocked. See Special headers for more information. * The name of the multipart/form-data parameter that contains the attachments must be file
. The following example uploads a file called myfile.txt to the issue TEST-123: curl -D- -u admin:admin -X POST -H \"X-Atlassian-Token: no-check\" -F \"file=@myfile.txt\" https://your-domain.atlassian.net/rest/api/2/issue/TEST-123/attachments
Tip: Use a client library. Many client libraries have classes for handling multipart POST operations. For example, in Java, the Apache HTTP Components library provides a MultiPartEntity class for multipart POST operations. This operation can be accessed anonymously. Permissions required: * Browse Projects and Create attachments project permission for the project that the issue is in. * If issue-level security is configured, issue-level security permission to view the issue.