diff --git a/File.js b/File.js index 5537d71..4a9d869 100644 --- a/File.js +++ b/File.js @@ -34,7 +34,14 @@ if (!self.name) { throw new Error("No name"); } - self.type = self.type || mime.lookup(self.name); + + try { + self.type = self.type || mime.lookup(self.name) + } catch {} + + try { + self.type = self.type || mime.getType(self.name) + } catch {} if (!self.path) { if (self.buffer) {