Honor body format before uploading file type parameters

This commit is contained in:
Jonathan Chan 2014-08-28 01:48:10 -04:00
parent 72a1418b7d
commit 493e6066b3

View File

@ -357,6 +357,11 @@
return false; 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) { if (hasFileTypes) {
// retrieve all the parameters to send for file upload // retrieve all the parameters to send for file upload
$('.parameters .tuple', $(this)).each(function() { $('.parameters .tuple', $(this)).each(function() {