MrRefactoring / jira.js

A JavaScript/TypeScript wrapper for the JIRA Cloud, Service Desk and Agile REST API
https://mrrefactoring.github.io/jira.js/
MIT License
349 stars 46 forks source link

getAttachmentContent returns wrong data #221

Closed RealBuddy closed 1 year ago

RealBuddy commented 1 year ago

Hi, I guess there is an issue in this method: https://mrrefactoring.github.io/jira.js/classes/Version3.IssueAttachments.html#getAttachmentContent it returns anything but the arraybuffer could you please add responseType: 'arraybuffer', here https://github.com/MrRefactoring/jira.js/blob/4244e854dd1d8e01321267cb3e8481451a0a24e0/src/version3/issueAttachments.ts#L57 so it will look like this.

image
MrRefactoring commented 1 year ago

Hi @RealBuddy! Let me check

RealBuddy commented 1 year ago

@MrRefactoring Thank you! I've killed more than ten hours trying to decode the returned string :)

MrRefactoring commented 1 year ago

Fixed in v2.15.4

RealBuddy commented 1 year ago

Thank you!