1
0
Fork 1
mirror of https://example.com synced 2024-11-24 06:16:39 +09:00
This commit is contained in:
syuilo 2021-12-26 01:42:06 +09:00
parent 89a532eeac
commit 3692c9eb64

View file

@ -99,7 +99,10 @@ export async function getFileInfo(path: string): Promise<FileInfo> {
/**
* Detect MIME Type and extension
*/
export async function detectType(path: string) {
export async function detectType(path: string): Promise<{
mime: string;
ext: string | null;
}> {
// Check 0 byte
const fileSize = await getFileSize(path);
if (fileSize === 0) {