jjwilly16 / node-pdftk

A wrapper for PDF Toolkit with streams and promises.
MIT License
141 stars 34 forks source link

Override temporary file write directory #19

Closed individual11 closed 5 years ago

individual11 commented 6 years ago

Love the library, but couldn't be used inside of AWS Lambda, because on the /tmp is available for write access. I made it so you can pass in a new temporary directory path and tested it on lambda. Works perfect.

Let me know if something else needs to be done for it, or if you have a better way.

sirzachary commented 5 years ago

I'm experiencing the same issue and this feature would be a huge help!

individual11 commented 5 years ago

I haven't had a chance to add what Justin wanted, but you can use my repo, or just add the code manually temporarily.

vic-vic- commented 5 years ago

Hi @individual11 @jjwilly16 ,

Will this be implemented anytime soon? Currently using this tool in AWS and would like to have this ability in production. Thanks in advance!

joemaller commented 5 years ago

What needs to happen to get this merged? I'm in the same situation with AWS Lambda, happy to help.

https://github.com/Buddy-Technology/node-pdftk/pull/1

individual11 commented 5 years ago

It's just a time thing. I'll try to knock it out this weekend with a new pull request. The code still works when you update manually. I deploy it to lambda via the serverless framework and haven't had a single issue.

jjwilly16 commented 5 years ago

@individual11 If you merge my pull request in your forked repository, you shouldn't have to resubmit. Those changes should be reflected here and I can merge this request, if I'm not mistaken.

individual11 commented 5 years ago

Ok, did the merge on my fork (sorry for the delay on that, not sure how that slipped through).

jjwilly16 commented 5 years ago

@individual11 no worries. Thanks for your help.

I published 2.1.0 on npm with this feature. I kind of rushed it out since so many people are waiting for it. Just let me know if there are problems.

joemaller commented 5 years ago

Thank you both for making this happen!