UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

1 lines 747 B
{"version":3,"file":"build-download-content-disposition.mjs","names":[],"sources":["../../../src/utils/media/build-download-content-disposition.ts"],"sourcesContent":["import getDownloadFileName from \"./get-download-file-name.js\";\n\n/**\n * Builds a safe download disposition header value from persisted media\n * metadata so controllers and adapters all serialize filenames the same way.\n */\nconst buildDownloadContentDisposition = (props: {\n\tkey: string;\n\tfileName?: string | null;\n\textension?: string | null;\n}) => {\n\tconst fileName = getDownloadFileName(props);\n\treturn `attachment; filename=\"${fileName}\"`;\n};\n\nexport default buildDownloadContentDisposition;\n"],"mappings":"4CAMA,MAAM,EAAmC,GAMjC,yBADU,EAAoB,CACE,EAAE"}