[DS-3991] changed the default name of a downloaded file to content in the client.js

This commit is contained in:
Raf Ponsaerts
2018-10-02 08:09:02 +02:00
parent 349eebb834
commit aacb7b0ee3

View File

@@ -36,7 +36,7 @@ function downloadFile(url) {
// Try to find out the filename from the content disposition `filename` value
var disposition = request.getResponseHeader('content-disposition');
var matches = /"([^"]*)"/.exec(disposition);
var filename = (matches != null && matches[1] ? matches[1] : 'file.pdf');
var filename = (matches != null && matches[1] ? matches[1] : 'content');
// The actual download
var contentTypeHeader = request.getResponseHeader("content-type");
if (contentTypeHeader === undefined || contentTypeHeader === "") {