migration: migrate NodeJS code base to Golang

This commit is contained in:
Mickael Kerjean
2018-07-18 14:20:30 +10:00
parent c5f2839fd7
commit 04c97e34fb
68 changed files with 3837 additions and 2217 deletions

View File

@ -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{