added fix from outdated PR #1122
This commit is contained in:
@@ -608,10 +608,10 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
pre = $('<audio controls>').append($('<source>').attr('src', url).attr('type', contentType));
|
||||
|
||||
// Download
|
||||
} else if (headers['Content-Disposition'].test(/attachment/) ||
|
||||
headers['content-disposition'].test(/attachment/) ||
|
||||
headers['Content-Description'].test(/File Transfer/) ||
|
||||
headers['content-description'].test(/File Transfer/)) {
|
||||
} else if ((headers['Content-Disposition'] && headers['Content-Disposition'].test(/attachment/)) ||
|
||||
(headers['content-disposition'] && headers['content-disposition'].test(/attachment/)) ||
|
||||
(headers['Content-Description'] && headers['Content-Description'].test(/File Transfer/)) ||
|
||||
(headers['content-description'] && headers['content-description'].test(/File Transfer/))) {
|
||||
|
||||
if ('Blob' in window) {
|
||||
var type = contentType || 'text/html';
|
||||
|
||||
Reference in New Issue
Block a user