Open
Description
API Spec link
API Spec version
2024-02-15-preview
Describe the bug
The "filename" of a File should not be in multipart/form-data model.
In TypeSpec design, the part would be written as
HttpPart<File, #{ name: "file" }>,
And the filename is included in the File.
Expected behavior
This "filename" should not be in model or method.
It is up to SDK emitter to determine, how to let user to set a "filename" for the File.
0000: --------------------------NWdLREXJ51lgZwiipJsqHR
0032: Content-Disposition: form-data; name="file"; filename=<filename>
005f: Content-Type: application/octet-stream
0087:
0089: The word 'apple' uses the code 442345, while the word 'banana' u
00c9: ses the code 673457.
Actual behavior
This extra "filename" part.
Java had to customize the method signature to remove it. Azure/azure-sdk-for-java#38698
Assistants backend would error, if filename
is sent as part.
{
"error": {
"message": "Additional properties are not allowed ('filename' was unexpected)",
"type": "invalid_request_error",
"param": null,
"code": null
}
}
Reproduction Steps
NOOP
Environment
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment