How to use the filer.Path.basename function in filer

To help you get started, we’ve selected a few filer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github humphd / nohost / src / webserver.js View on Github external
function formatContentDisposition(path, stats) {
  const filename = Path.basename(path);
  const modified = stats.mtime.toUTCString();
  return `attachment; filename="${filename}"; modification-date="${modified}"; size=${stats.size};`;
}