Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attachments download #15

Closed
hypery2k opened this issue Dec 7, 2021 · 4 comments · Fixed by #16
Closed

Attachments download #15

hypery2k opened this issue Dec 7, 2021 · 4 comments · Fixed by #16
Labels
bug Indicates a reported issue or malfunction that needs fixing

Comments

@hypery2k
Copy link

hypery2k commented Dec 7, 2021

I tried to use the downloadAttachement feature, but the encoding seems incorrect:

image

�PNG... --> should begin with <89>PNG...

Any ideas?

@MrRefactoring
Copy link
Owner

Hi @hypery2k. I will play with axios encoding may it help :)

@hypery2k
Copy link
Author

hypery2k commented Dec 8, 2021

thanks for the fast response, I think a customer OnResponseHandler ( see /~https://github.com/MrRefactoring/confluence.js/blob/master/src/clients/baseClient.ts#L137 could help)

I could be added here: /~https://github.com/MrRefactoring/confluence.js/blob/master/src/api/contentAttachments.ts#L375

@MrRefactoring MrRefactoring added the bug Indicates a reported issue or malfunction that needs fixing label Dec 9, 2021
@MrRefactoring MrRefactoring linked a pull request Dec 9, 2021 that will close this issue
MrRefactoring added a commit that referenced this issue Dec 9, 2021
* expand expanded :)

* New experimental endpoints

* bug fixes

* tests fixes
@MrRefactoring
Copy link
Owner

Hi @hypery2k. I fixed it. Now you can just writeFile when getting a response (return type is ArrayBuffer)

@hypery2k
Copy link
Author

thanks, works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates a reported issue or malfunction that needs fixing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants