-
Notifications
You must be signed in to change notification settings - Fork 131
Closed
Labels
Description
Describe the bug
"Content-Type": "multipart/form-data" is not set when I try to send attachments > 3mb.
To Reproduce
Some steps involved to reproduce the bug and any code samples you can share.
request_body = {
subject: "send large attachments",
body: "large attachments",
attachments: [
{ content: "<large content here>", content_type: "", size: SIZE, filename: "filename"}
],
to: [{email: "some@one.com"}]
}
response, _request_id = nylas.messages.send(identifier:, request_body:)
I get an error:
Nylas::NylasApiError (request must be of content-type multipart/form-data or application/json):
Expected behavior
Large attachments are sent correctly
SDK Version:
nylas (6.1.1)
Additional context
Update: IT DOES NOT HELP
Possible fix:
https://github.com/nylas/nylas-ruby/blob/main/lib/nylas/handler/http_client.rb#L101
Add line:
resulting_headers["Content-type"] = "multipart/form-data"