1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-11-24 08:42:24 +02:00

removing mime dependency

This commit is contained in:
Braun Patrik 2017-07-13 19:13:26 +02:00
parent e66886ffcb
commit 7e3a0322c2
2 changed files with 10 additions and 13 deletions

View File

@ -4,28 +4,27 @@ import {CameraMetadata, GPSMetadata, ImageSize, PhotoDTO, PhotoMetadata} from ".
import {Logger} from "../../Logger";
import * as fs from "fs";
import * as path from "path";
import * as mime from "mime";
import * as iptc from "node-iptc";
import * as exif_parser from "exif-parser";
import {ProjectPath} from "../../ProjectPath";
const LOG_TAG = "[DiskManagerTask]";
export class DiskMangerWorker {
private static isImage(fullPath: string) {
let imageMimeTypes = [
'image/bmp',
'image/gif',
'image/jpeg',
'image/png',
'image/pjpeg',
'image/tiff',
'image/webp',
'image/x-tiff',
'image/x-windows-bmp'
'bmp',
'gif',
'jpeg', 'jpg', 'jpe',
'png',
'tiff', 'tif',
'webp',
'ico',
'tga'
];
let extension = mime.lookup(fullPath);
let extension = path.extname(fullPath).toLowerCase();
return imageMimeTypes.indexOf(extension) !== -1;
}

View File

@ -25,7 +25,6 @@
"url": "https://github.com/bpatrik/PiGallery2/issues"
},
"dependencies": {
"@types/bcryptjs": "2.4.0",
"bcryptjs": "2.4.3",
"body-parser": "1.17.2",
"ejs": "2.5.6",
@ -34,7 +33,6 @@
"express-session": "1.15.3",
"flat-file-db": "1.0.0",
"jimp": "0.2.28",
"mime": "1.3.6",
"mysql": "2.13.0",
"node-iptc": "1.0.4",
"reflect-metadata": "0.1.10",