CartoDB-SQL-API/app/utils/content_disposition.js
2015-12-03 17:28:18 +01:00

9 lines
323 B
JavaScript

'use strict';
module.exports = function getContentDisposition(formatter, filename, inline) {
var ext = formatter.getFileExtension();
var time = new Date().toUTCString();
return ( inline ? 'inline' : 'attachment' ) + '; filename=' + filename + '.' + ext + '; ' +
'modification-date="' + time + '";';
};