File upload api being blocked
mbhagdev opened this issue · 3 comments
File upload api is being blocked when it should be allowed. Can you please suggest what can be changed in order to allow this upload?
The spec has it defined as { "/document/upload": { "post": { "tags": [ "document-controller" ], "operationId": "Document_1", "parameters": [ { "name": "id", "in": "query", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "required": [ "file" ], "type": "object", "properties": { "file": { "type": "string", "format": "binary" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } } } } } }
The error when uploading a docx is api-firewall | time=2021-12-04T17:32:18Z level=error msg=#0000000900000001 : request validation error: request body has an error: failed to decode request body: path file: unsupported content type "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
The content type passed in request header is Content-Type multipart/form-data; boundary=---------------------------162567064334244515552744535554
Request itself is
`-----------------------------162567064334244515552744535554
Content-Disposition: form-data; name="file"; filename="mydoc.docx"
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
TEST-doc
-----------------------------162567064334244515552744535554--
`
we are on it. should be ready soon.
fixed in 0.6.6