Skip to content

Sending file in Java doesn't work #235

@xhh

Description

@xhh

I tried the uploadFile method in the Petstore's Java client:
https://github.com/wordnik/swagger-codegen/blob/master/samples/client/petstore/java/src/main/java/com/wordnik/petstore/api/PetApi.java#L173

but got the following error:

Caused by: com.wordnik.client.ApiException: {"code":400,"message":"org.jvnet.mimepull.MIMEParsingException: Missing start boundary"}
        at com.wordnik.client.ApiInvoker.invokeAPI(ApiInvoker.java:168)
        at com.wordnik.petstore.api.PetApi.uploadFile(PetApi.java:189)

It seems to due to the "boundary" is not set, as in similar discussions I found:
Image upload with Swagger UI in Java
swagger-api/swagger-ui#288

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions