fix for #248
This commit is contained in:
22
dist/swagger-ui.js
vendored
22
dist/swagger-ui.js
vendored
@@ -1509,16 +1509,14 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
contentTypeModel.produces = this.model.produces;
|
||||
_ref5 = this.model.parameters;
|
||||
for (_i = 0, _len = _ref5.length; _i < _len; _i++) {
|
||||
param = _ref5[_i];
|
||||
type = param.type || param.dataType;
|
||||
|
||||
if (typeof(type) != 'undefined' && type.toLowerCase() === 'file') {
|
||||
if (!contentTypeModel.consumes) {
|
||||
console.log("set content type ");
|
||||
contentTypeModel.consumes = 'multipart/form-data';
|
||||
}
|
||||
}
|
||||
|
||||
param = _ref5[_i];
|
||||
type = param.type || param.dataType;
|
||||
if (type.toLowerCase() === 'file') {
|
||||
if (!contentTypeModel.consumes) {
|
||||
console.log("set content type ");
|
||||
contentTypeModel.consumes = 'multipart/form-data';
|
||||
}
|
||||
}
|
||||
}
|
||||
responseContentTypeView = new ResponseContentTypeView({
|
||||
model: contentTypeModel
|
||||
@@ -1906,8 +1904,8 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
if (this.model.paramType === 'body') {
|
||||
this.model.isBody = true;
|
||||
}
|
||||
if (typeof(type) != 'undefined' && type.toLowerCase() === 'file') {
|
||||
this.model.isFile = true;
|
||||
if (type.toLowerCase() === 'file') {
|
||||
this.model.isFile = true;
|
||||
}
|
||||
template = this.template();
|
||||
$(this.el).html(template(this.model));
|
||||
|
||||
Reference in New Issue
Block a user