You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method for adding files to issue only accepts a buffer, this is not very convenient, I want to get a preview of the file in jira and its type, but it turns out that I won't be able to send it.
/** Add attachment to a Issue * [Jira Doc](https://docs.atlassian.com/jira/REST/latest/#api/2/issue/{issueIdOrKey}/attachments-addAttachment) * @param issueId - issue id * @param readStream - readStream object from fs */addAttachmentOnIssue(issueId: string,readStream: Buffer){constformData=newFormData();formData.append("file",newBlob([readStream],{type: "application/octet-stream"}));returnthis.doRequest<unknown>(this.makeRequestHeader(this.makeUri({pathname: `/issue/${issueId}/attachments`,}),{method: "POST",headers: {"X-Atlassian-Token": "nocheck",},data: formData,},),);}
In the classic version of the library it is possible to send streams, as far as I know, this is due to the fact that they use postman instead of axios.
For me, the most important thing is that you can transfer the name and type of the file.
The text was updated successfully, but these errors were encountered:
The method for adding files to issue only accepts a buffer, this is not very convenient, I want to get a preview of the file in jira and its type, but it turns out that I won't be able to send it.
In the classic version of the library it is possible to send streams, as far as I know, this is due to the fact that they use postman instead of axios.
For me, the most important thing is that you can transfer the name and type of the file.
The text was updated successfully, but these errors were encountered: