blob: b2aec471d589cf72f2119c8879cabe879cb46f51 (
plain)
1
2
3
4
5
6
|
import cd from 'content-disposition';
export function contentDisposition(type: 'inline' | 'attachment', filename: string): string {
const fallback = filename.replace(/[^\w.-]/g, '_');
return cd(filename, { type, fallback });
}
|