diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-12-26 01:42:06 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-12-26 01:42:06 +0900 |
| commit | 3692c9eb646d83a78308e559ee2a70761e40fc7f (patch) | |
| tree | 3a5ae4100a07898146df2a1e6a75f2569660e206 /packages/backend/src/misc | |
| parent | chore(client): tweak style (diff) | |
| download | misskey-3692c9eb646d83a78308e559ee2a70761e40fc7f.tar.gz misskey-3692c9eb646d83a78308e559ee2a70761e40fc7f.tar.bz2 misskey-3692c9eb646d83a78308e559ee2a70761e40fc7f.zip | |
refactor
Diffstat (limited to 'packages/backend/src/misc')
| -rw-r--r-- | packages/backend/src/misc/get-file-info.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/backend/src/misc/get-file-info.ts b/packages/backend/src/misc/get-file-info.ts index f36aa8f966..361cdd2951 100644 --- a/packages/backend/src/misc/get-file-info.ts +++ b/packages/backend/src/misc/get-file-info.ts @@ -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) { |