Skip to content

Conversation

@TarasZakus
Copy link
Contributor

Current version of bref/local-api-gateway supports only 'Content-Type: multipart/form-data',
whereas inline body (e.g. image/jpeg) is not encoded properly and the uploaded file is corrupted.

For example, the following request works:

PUT https://api.test/upload/profile-image
Content-Type: multipart/form-data;boundary="BoundaryDelimiter"
Accept: application/json

--BoundaryDelimiter
Content-Disposition: form-data; name="file"; filename="test.jpeg"
Content-Type: image/jpeg

< /home/images/test.jpeg
--BoundaryDelimiter--

, but this request doesn't work:

PUT https://api.test/upload/profile-image
Content-Type: image/jpeg
Accept: application/json
Content-Disposition: inline; filename="test.jpeg"

< /home/images/test.jpeg

Change in this PR resolves the issue.

Current version of `bref/local-api-gateway` supports only 'Content-Type: multipart/form-data', whereas inline body (e.g. image/jpeg) is not encoded properly and the uploaded file is corrupted.

This change resolves the issue.
@mnapoli mnapoli merged commit 6efebfe into brefphp:main Sep 3, 2025
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants