mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-02 03:54:59 +08:00
migration: migrate NodeJS code base to Golang
This commit is contained in:
@ -1,9 +1,8 @@
|
||||
import Path from 'path';
|
||||
import db from '../../server/common/mimetype.json';
|
||||
|
||||
export function getMimeType(file){
|
||||
let ext = Path.extname(file).replace(/^\./, '').toLowerCase();
|
||||
let mime = db[ext];
|
||||
let mime = CONFIG.mime[ext];
|
||||
if(mime){
|
||||
return mime;
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user