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