Skip to content
New issue

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

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

Open
ystreibel opened this issue Sep 19, 2018 · 2 comments

Comments

@ystreibel
Copy link

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?

@m34nbunny
Copy link

Find a solution for this without using multer?

@avtaniket
Copy link

@ystreibel How did u fix this? any solution is helpful.

I faced similar issue after upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants