1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-24 23:26:50 +02:00

Desktop, Cli: Give correct mime type to more file types

This commit is contained in:
Laurent Cozic
2019-10-08 21:36:33 +02:00
parent fbba4a1ec4
commit add9dda759
4 changed files with 11 additions and 8 deletions

@ -122,7 +122,6 @@ function shimInit() {
const { uuid } = require('lib/uuid.js');
const { basename, fileExtension, safeFileExtension } = require('lib/path-utils.js');
const mime = require('mime/lite');
if (!(await fs.pathExists(filePath))) throw new Error(_('Cannot access %s', filePath));
@ -132,7 +131,7 @@ function shimInit() {
let resource = Resource.new();
resource.id = resourceId;
resource.mime = mime.getType(filePath);
resource.mime = mimeUtils.fromFilename(filePath);
resource.title = basename(filePath);
let fileExt = safeFileExtension(fileExtension(filePath));