Skip to content
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

Improve big attachment handling #622

Open
trulex opened this issue Feb 11, 2025 · 0 comments
Open

Improve big attachment handling #622

trulex opened this issue Feb 11, 2025 · 0 comments

Comments

@trulex
Copy link

trulex commented Feb 11, 2025

Is your feature request related to a problem? Please describe.
Sending attachments greater than 3 MB without providing optional size when calling messages.send() will fail.

Describe the solution you'd like
SDK should load file and figure out the size without relying on the client provided info.

Describe alternatives you've considered
Change api docs so it's clear that size is required when attachment is > 3MB.

Additional context
I spent some time debugging Error sending message: Error: max size of attachments for json is 3MB, received '6060096' to figure out size is actually required for SDK to figure out if multipart should be used. I haven't provided size since it's an optional argument and it's not clear in the docs it must be provided for this to work. After providing size it works as expected.
Relevant PR: #544

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant