Merge pull request #498 from jonmchan/honorBodyFormat

Honor body format before uploading file type parameters
This commit is contained in:
William Durand 2014-10-08 11:36:12 +02:00
commit 6d50c200ba

View File

@ -413,6 +413,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() {