-
Notifications
You must be signed in to change notification settings - Fork 410
attachments - Support for InputStream? #134
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
Comments
Hello @ChickenSniper, Well, now we do :) I'll add this to our backlog so we can add this to the Mail Helper. Meanwhile, the |
Hi! Is it still relevant? I can help with this if its still needed. |
@dmitraver It would definitely be helpful...I'm using this library in my scala application, so streams are very important to us for performance... |
Thanks for offering to help! Please take a moment to sign our CLA so that I can merge your solution when ready: https://github.com/sendgrid/sendgrid-java/blob/master/CONTRIBUTING.md#cla |
@thinkingserious cool, then I will sign a CLA and make a PR in a couple of days |
I've checked the code and it looks like I just need to add a new method that accepts InputStream as a parameter and then calls setContent which doesn't sound really helpful. I haven't found any methods that accept plain Files in current version. Has I missed something? |
Here is how it was done previously:
I hope that helps. |
…ing content as InputStream.
…ing content as InputStream.
…ing content as InputStream.
…ing content as InputStream.
When I look at Attachments.Builder, I see that it calls toByteArray at some point.
Does then the solution scale? Are there better options for sending attachemnts? If there are 10 request at sime time, each sending 10mb attachment file, then 100mb of RAM will be used? |
In version 3, any plans to update attachments to support InputStream instead of File? Our system creates PDF on the fly, never saving to file system. Works in your version 2...need this to upgrade.
Thanks!
The text was updated successfully, but these errors were encountered: