Introduce protocol for attachments
Currently, Bamboo.Attachment.new supports only 2 ways of creating an attachment:
- Plug.Upload
- path to a file https://github.com/beam-community/bamboo/blob/220835d7079337b90bf6f2e1cd4f0e9789b8e3ed/lib/bamboo/attachment.ex#L39-L43
I have a custom struct for in-memory files, so neither approach fits, and I have to build the struct manually.
I suggest adding a protocol (perhaps Bamboo.Attachable?) that allows building a Bamboo.Attachment struct, and updating Bamboo.Email.put_attachment to accept any value that implements this protocol.
This issue has been automatically marked as "stale:discard". We are sorry that we haven't been able to prioritize it yet. If this issue still relevant, please leave any comment if you have any new additional information that helps to solve this issue. We encourage you to create a pull request, if you can. We are happy to help you with that.
Dear bot
It's not a problem to create a PR, but I'd like to have a discussion before spending time on this
This issue has been automatically marked as "stale:discard". We are sorry that we haven't been able to prioritize it yet. If this issue still relevant, please leave any comment if you have any new additional information that helps to solve this issue. We encourage you to create a pull request, if you can. We are happy to help you with that.
Still relevant
This issue has been automatically marked as "stale:discard". We are sorry that we haven't been able to prioritize it yet. If this issue still relevant, please leave any comment if you have any new additional information that helps to solve this issue. We encourage you to create a pull request, if you can. We are happy to help you with that.
Still relevant
This issue has been automatically marked as "stale:discard". We are sorry that we haven't been able to prioritize it yet. If this issue still relevant, please leave any comment if you have any new additional information that helps to solve this issue. We encourage you to create a pull request, if you can. We are happy to help you with that.
Closing this issue after a prolonged period of inactivity. If this issue is still relevant, feel free to re-open the issue. Thank you!