9 lines
214 B
JavaScript
9 lines
214 B
JavaScript
import cd from "content-disposition";
|
|
export function contentDisposition(type, filename) {
|
|
const fallback = filename.replace(/[^\w.-]/g, "_");
|
|
return cd(filename, {
|
|
type,
|
|
fallback
|
|
});
|
|
}
|