Skip to content

Add multipart/form-data support for Ktor client and server#16

Draft
ulrikandersen wants to merge 2 commits intomasterfrom
feat/multipart-ktor
Draft

Add multipart/form-data support for Ktor client and server#16
ulrikandersen wants to merge 2 commits intomasterfrom
feat/multipart-ktor

Conversation

@ulrikandersen
Copy link
Copy Markdown
Owner

Summary

  • Introduces core multipart handling with new MultipartParameter model and generator utilities
  • Implements multipart file upload for Ktor client using MultiPartFormDataContent
  • Implements multipart file upload for Ktor server controller using ReceivedFile wrapper for file metadata

This PR contains the core/shared changes that other multipart PRs depend on.

Introduces core multipart handling with new MultipartParameter model
and generator utilities. Implements multipart file upload for both
Ktor client (using MultiPartFormDataContent) and Ktor server
controller (using ReceivedFile wrapper for file metadata).
- Replace var assignments with mutableListOf collectors for cleaner Kotlin
- Add part.dispose() call after processing each multipart part per Ktor docs
- Extract single values using firstOrNull() from collected lists
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