From 493e6066b37c7247ab2a5357d4eba51ff178777d Mon Sep 17 00:00:00 2001 From: Jonathan Chan Date: Thu, 28 Aug 2014 01:48:10 -0400 Subject: [PATCH] Honor body format before uploading file type parameters --- Resources/views/layout.html.twig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index fbd4213..7c312ea 100755 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -357,6 +357,11 @@ return false; } + if (hasFileTypes && bodyFormat != 'form') { + alert("Body Format must be set to 'Form Data' when utilizing file upload type parameters.\nYour current bodyFormat is '" + bodyFormat + "'. Change your BodyFormat or do not use file type\nparameters."); + return false; + } + if (hasFileTypes) { // retrieve all the parameters to send for file upload $('.parameters .tuple', $(this)).each(function() {