bamboo icon indicating copy to clipboard operation
bamboo copied to clipboard

Introduce protocol for attachments

Open fuelen opened this issue 8 months ago • 2 comments

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.

fuelen avatar May 02 '25 07:05 fuelen

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.

github-actions[bot] avatar Jun 02 '25 02:06 github-actions[bot]

Dear bot

It's not a problem to create a PR, but I'd like to have a discussion before spending time on this

fuelen avatar Jun 03 '25 08:06 fuelen

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.

github-actions[bot] avatar Jul 04 '25 02:07 github-actions[bot]

Still relevant

fuelen avatar Jul 04 '25 07:07 fuelen

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.

github-actions[bot] avatar Aug 04 '25 02:08 github-actions[bot]

Still relevant

fuelen avatar Aug 04 '25 05:08 fuelen

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.

github-actions[bot] avatar Sep 05 '25 02:09 github-actions[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still relevant, feel free to re-open the issue. Thank you!

github-actions[bot] avatar Sep 21 '25 02:09 github-actions[bot]