-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[kotlin] [multiplatform] [jvm-ktor] Fix formdata file upload #21056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
thanks for the PR using the spec provided, I did a test with
but i don't see any change in the code (only changes in the doc - DefaultApi.md) am I testing your change with the right configurations/options? |
That seems strange, i get the following diff vs. the generated code using master:
Used the same command with the yaml from this PR |
@wing328 : could you restart the ci, i solved the merge conflicts and somehow the ci has an error now.. |
restarted (by closing and reopening the PR) |
The currently generated code for multipart/form-data does not compile for binary parameters.
See #9423, #19644 and #18094. It also fails when there's a list of files to be uploaded.
This PR includes 2 changes:
No. 2 has some implications:
FormPart("document", inputProvider)
This may not be the most convenient solution to upload files, but it should suit every application as it leaves FormPart creation to the caller.
I think this would be a good improvement to the current state.
Sample Yaml:
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming7.x.0
minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)@dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) @e5l (2024/10)