CartoDB-SQL-API/lib/utils/content-disposition.js

9 lines
322 B
JavaScript
Raw Normal View History

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