We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.2.0
client:
formData { append( key = "image_uploaded", value = fileBytes, headers = Headers.build { append(HttpHeaders.ContentType, "image/jpeg") append(HttpHeaders.ContentDisposition, "filename=$fileName") } ) }
server: move_uploaded_file($_FILES['image_uploaded']['tmp_name'], $save_path)
move_uploaded_file($_FILES['image_uploaded']['tmp_name'], $save_path)
request log: CONTENT HEADERS -> Content-Length: 264 -> Content-Type: multipart/form-data; boundary=-29ba7bac7be92961eeb6d65e5b9fa25b018a-13264733-7a5b7dadb92921f61f886e- BODY Content-Type: multipart/form-data; boundary=-29ba7bac7be92961eeb6d65e5b9fa25b018a-13264733-7a5b7dadb92921f61f886e- BODY START ---29ba7bac7be92961eeb6d65e5b9fa25b018a-13264733-7a5b7dadb92921f61f886e- Content-Disposition: form-data; name="" Content-Length: 49
io.ktor.http.content.PartData$BinaryItem@1a503a68 ---29ba7bac7be92961eeb6d65e5b9fa25b018a-13264733-7a5b7dadb92921f61f886e---
response log: Undefined array key "image_uploaded"
fix @multipart
if i use "@Body map: MultiPartFormDataContent", no issue at all
The text was updated successfully, but these errors were encountered:
@Foso
Sorry, something went wrong.
same: #739 only @Body works, but @multipart doesn't work
No branches or pull requests
Ktorfit version
2.2.0
What happened and how can we reproduce this issue?
client:
server:
move_uploaded_file($_FILES['image_uploaded']['tmp_name'], $save_path)
request log:
CONTENT HEADERS
-> Content-Length: 264
-> Content-Type: multipart/form-data; boundary=-29ba7bac7be92961eeb6d65e5b9fa25b018a-13264733-7a5b7dadb92921f61f886e-
BODY Content-Type: multipart/form-data; boundary=-29ba7bac7be92961eeb6d65e5b9fa25b018a-13264733-7a5b7dadb92921f61f886e-
BODY START
---29ba7bac7be92961eeb6d65e5b9fa25b018a-13264733-7a5b7dadb92921f61f886e-
Content-Disposition: form-data; name=""
Content-Length: 49
io.ktor.http.content.PartData$BinaryItem@1a503a68
---29ba7bac7be92961eeb6d65e5b9fa25b018a-13264733-7a5b7dadb92921f61f886e---
response log:
Undefined array key "image_uploaded"
What did you expect to happen?
fix @multipart
Is there anything else we need to know about?
if i use "@Body map: MultiPartFormDataContent", no issue at all
The text was updated successfully, but these errors were encountered: