mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 03:17:38 -07:00
refactor
This commit is contained in:
parent
9b5e8a87e9
commit
2fd17e91aa
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue