mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 21:29:11 +00:00
Warn when can't identify mimeType of files in Desktop, Obsidian clients
This commit is contained in:
@@ -106,6 +106,7 @@ function filenameToMimeType (filename) {
|
|||||||
case 'org':
|
case 'org':
|
||||||
return 'text/org';
|
return 'text/org';
|
||||||
default:
|
default:
|
||||||
|
console.warn(`Unknown file type: ${extension}. Defaulting to text/plain.`);
|
||||||
return 'text/plain';
|
return 'text/plain';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ function filenameToMimeType (filename: TFile): string {
|
|||||||
case 'org':
|
case 'org':
|
||||||
return 'text/org';
|
return 'text/org';
|
||||||
default:
|
default:
|
||||||
|
console.warn(`Unknown file type: ${filename.extension}. Defaulting to text/plain.`);
|
||||||
return 'text/plain';
|
return 'text/plain';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user