This commit is contained in:
Tony Tam
2015-05-08 13:28:12 -07:00
parent 8661a0f2f6
commit a02cea119d

View File

@@ -629,10 +629,10 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
pre = $('<audio controls>').append($('<source>').attr('src', url).attr('type', contentType)); pre = $('<audio controls>').append($('<source>').attr('src', url).attr('type', contentType));
// Download // Download
} else if ((headers['Content-Disposition'] && headers['Content-Disposition'].test(/attachment/)) || } else if (headers['Content-Disposition'] && (/attachment/).test(headers['Content-Disposition']) ||
(headers['content-disposition'] && headers['content-disposition'].test(/attachment/)) || headers['content-disposition'] && (/attachment/).test(headers['content-disposition']) ||
(headers['Content-Description'] && headers['Content-Description'].test(/File Transfer/)) || headers['Content-Description'] && (/File Transfer/).test(headers['Content-Description']) ||
(headers['content-description'] && headers['content-description'].test(/File Transfer/))) { headers['content-description'] && (/File Transfer/).test(headers['content-description'])) {
if ('Blob' in window) { if ('Blob' in window) {
var type = contentType || 'text/html'; var type = contentType || 'text/html';