Skip to content

Commit 248b129

Browse files
committed
fix(http-client): replace Tempfile with StringIO for multipart uploads
- Replace Tempfile with StringIO in prepare_multipart_payload to eliminate filesystem dependencies - Add enhanced StringIO compatibility methods for HTTParty multipart handling - Update test expectations from Tempfile to StringIO - Add defensive file closing in messages.rb - Resolves issues with read-only containers and AWS Lambda environments Fixes #528
1 parent c35e81e commit 248b129

File tree

8 files changed

+885
-103
lines changed

8 files changed

+885
-103
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
**/*/.env
33
# Example test files
44
examples/messages/large_test_file.txt
5+
examples/messages/small_pdf_test_file.pdf
6+
examples/messages/large_pdf_test_file.pdf
7+
examples/messages/large_jpg_test_file.jpg
58
*.gem
69
*.rbc
710
.bundle

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### [Unreleased]
44
* Added support for `single_level` query parameter in Folders API for Microsoft accounts
55
* Added support for `include_hidden_folders` query parameter in folders list endpoint for Microsoft accounts to control whether hidden folders are included in the response
6+
* Replace Tempfile with StringIO for multipart uploads to eliminate filesystem dependencies and improve compatibility with read-only containers and AWS Lambda environments
67

78
### 6.5.0 / 2025-06-13
89
* Replaced `rest-client` dependency with `httparty` for improved maintainability and security

0 commit comments

Comments
 (0)