Skip to content

Conversation

@wanlin31
Copy link
Collaborator

@wanlin31 wanlin31 commented Sep 15, 2025

Allow the byte data fall through to req.body without changing it.

This is needed for file.upload. Added a test to demonstrate.

@wanlin31 wanlin31 force-pushed the files branch 2 times, most recently from 682d5ad to cbb76a5 Compare September 16, 2025 17:09
@wanlin31 wanlin31 changed the title Hnadle file upload Handle file upload request Sep 16, 2025
return resultMap, nil
}
err = json.Unmarshal(body, &resultMap)
if err != nil {
Copy link
Collaborator Author

@wanlin31 wanlin31 Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the data can't be json.unmarshal, they can be the byte data from file upload. We let the byte data fall through to req.body without changing it.

@@ -0,0 +1,56 @@
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new file is part of the file upload, there was issue inside the genai python file upload, the headers are not passing through, have an internal fix for that.

@wanlin31 wanlin31 marked this pull request as ready for review September 16, 2025 17:50
@wanlin31 wanlin31 requested review from Annhiluc and hkt74 and removed request for Annhiluc and hkt74 September 16, 2025 17:50
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.

1 participant