chore(server): use native file-type implementation (#6686)

This commit is contained in:
Brooooooklyn
2024-04-29 04:46:26 +00:00
parent f98db24391
commit 81729703d9
10 changed files with 25 additions and 47 deletions

View File

@@ -0,0 +1,8 @@
use napi_derive::napi;
#[napi]
pub fn get_mime(input: &[u8]) -> String {
file_format::FileFormat::from_bytes(input)
.media_type()
.to_string()
}

View File

@@ -1,5 +1,6 @@
#![deny(clippy::all)]
pub mod file_type;
pub mod hashcash;
use std::fmt::{Debug, Display};