From 4055f51b930245b68b74a526aa3d0e033d2aa08c Mon Sep 17 00:00:00 2001 From: kyle Date: Sat, 7 Jul 2018 02:36:48 -0500 Subject: [PATCH] fix: support multimedia media types for file upload (#4705) --- src/core/plugins/oas3/components/request-body.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/plugins/oas3/components/request-body.jsx b/src/core/plugins/oas3/components/request-body.jsx index 9685d8dd..fb0baab2 100644 --- a/src/core/plugins/oas3/components/request-body.jsx +++ b/src/core/plugins/oas3/components/request-body.jsx @@ -36,7 +36,12 @@ const RequestBody = ({ return null } - if(contentType === "application/octet-stream") { + if( + contentType === "application/octet-stream" + || contentType.indexOf("image/") === 0 + || contentType.indexOf("audio/") === 0 + || contentType.indexOf("video/") === 0 + ) { const Input = getComponent("Input") if(!isExecute) {