-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Ktorfit version
2.5.2
What happened and how can we reproduce this issue?
The @Part file: List<PartData> not work with @Multipart, and the key: file,HttpHeaders.ContentType,HttpHeaders.ContentDisposition disappear
@Multipart
@POST("search")
suspend fun fetchCharacterInfoFromImage(
@Part file: List<PartData>,
@Part("model") model: String,
@Part("ai_detect") aiDetect: Boolean = false,
@Part("is_multi") showMulti: Boolean = true,
): ComposeTraceCharacter
client.traceMoeApi.fetchCharacterInfoFromImage(
model = "xxx",
aiDetect = false,
showMulti = true,
file = formData {
append("file", byteArray, Headers.build {
append(HttpHeaders.ContentType, "image/jpeg")
append(HttpHeaders.ContentDisposition, "filename=\"image.jpeg\"")
})
}
)What did you expect to happen?
正确上传文件
Is there anything else we need to know about?
No response
SaintPatrck and myfaverate
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
