Skip to content

Multipart -> Error: req.files must be provided for 'formData' parameters of type 'file' #28

@ystreibel

Description

@ystreibel

Hi,

There is an issue arround multipart entrypoint. Is not possible to upload file!

There is always this error message from apigee-127/sway librairy:

Error: req.files must be provided for 'formData' parameters of type 'file'

This my package.json dependencies:

  "dependencies": {
    "express": "^4.16.2",
    "swagger-express-mw": "~0.7.0"
  },

And the definition of my entrypoint:

/upload:
    x-swagger-router-controller: upload
    post:
      tags:
      - labels
      description: Upload file 
      consumes:
      - multipart/form-data
      operationId: upload
      parameters:
      - name: myFile
        type: file
        in: formData
        description: The file to upload.
        required: true
      - name: myText
        type: string
        in: formData
        description: Description of the file
        required: true
      responses:
        "201":
          description: Success
          schema:
            $ref: "#/definitions/UploadResponse"
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"

Could I hope an update or a fix for this issue?
If not, could you tell me what direction to take?

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