Skip to content

OpenAPI Spec: Issues with uploading files #345

@karanataryn

Description

@karanataryn

The Mintlify Web UI does not correctly upload files in the API request, passing it as a string instead of a file object. This leads to errors as seen below:
{"detail":[{"type":"value_error","loc":["body","file"],"msg":"Value error, Expected UploadFile, received: <class 'str'>","input":"[object Object]","ctx":{"error":{}}}]}

The construction of the cURL object is incorrect, as seen below:
curl --request POST \ --url https://url \ --header 'Authorization: Bearer REDACTED' \ --header 'Content-Type: multipart/form-data' \ --form 'file={}'

which should instead contain --form '[email protected]'

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