How to use the mime-types.getType function in mime-types

To help you get started, we’ve selected a few mime-types 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 perminder-klair / resume-parser / src / utils / libs / processing.js View on Github external
function PreparedFile(file, raw) {
  this.path = file;
  this.mime = mime.getType(file);
  this.ext = mime.getExtension(this.mime);
  this.raw = raw;
  this.name = path.basename(file);
}