Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
This adds the getAttachments method to get all the attachments from a pdf document.
Why?
This is basically implementing the suggestion in #534 (comment), where the use case was discussed. Mine is that I am looking into how to delete attachments, and this seemed like a prerequisite for that.
How?
I mostly copied the code from comments in that issue. There's some interesting behavior with
save
, as the attachments don't show up until aftersave
is called. That's tested and described in the README, just so it's clear that's the behavior, but I don't know if it's desired.Testing?
Added some unit tests for this function and for
attach
.New Dependencies?
N/A
Screenshots
N/A
Suggested Reading?
No, I hadn't seen that (and unfortunately the link is currently a 404). Besides the broken link I appreciate that section and am curious if you know if the spec is still available somewhere.
Anything Else?
I don't know how to do all that great jsfiddle setup, so for the README I just copied the basic example from that issue to start somewhere.
Also, thank you for this project!
Checklist