remove fileupload function

This commit is contained in:
Vitaliy Kanev
2015-05-16 15:47:45 +03:00
parent 9688af989e
commit 88838213c8

View File

@@ -331,7 +331,13 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
opts.requestContentType = $('div select[name=parameterContentType]', $(this.el)).val();
$('.response_throbber', $(this.el)).show();
if (isFileUpload) {
return this.handleFileUpload(map, form);
$('.request_url', $(this.el)).html('<pre></pre>');
$('.request_url pre', $(this.el)).text(this.invocationUrl);
opts.useJQuery = true;
map.parameterContentType = 'multipart/form-data';
return this.model.execute(map, opts, this.showCompleteStatus, this.showErrorStatus, this);
} else {
return this.model.execute(map, opts, this.showCompleteStatus, this.showErrorStatus, this);
}
@@ -341,16 +347,6 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
success: function(response, parent) {
parent.showCompleteStatus(response);
},
handleFileUpload: function(map, form,opts) {
$('.request_url', $(this.el)).html('<pre></pre>');
$('.request_url pre', $(this.el)).text(this.invocationUrl);
opts.useJQuery = true;
map.parameterContentType = 'multipart/form-data';
return this.model.execute(map, opts, this.showCompleteStatus, this.showErrorStatus, this);
},
// wraps a jquery response as a shred response
wrap: function(data) {