diff options
| author | cjd24 | 2018-04-26 09:42:39 +0100 |
|---|---|---|
| committer | cjd24 | 2018-04-26 09:42:39 +0100 |
| commit | 1aeec5a70fa2de8a63e09425f440a79fd602f53d (patch) | |
| tree | ca1f788a1fd031a6a506c36415ca84ea56891e60 /src/files.ts | |
| parent | fixing the call to create a scalable for the scn's (diff) | |
| download | medicine-1aeec5a70fa2de8a63e09425f440a79fd602f53d.tar.gz medicine-1aeec5a70fa2de8a63e09425f440a79fd602f53d.zip | |
another bug for mimetype
Diffstat (limited to 'src/files.ts')
| -rw-r--r-- | src/files.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/files.ts b/src/files.ts index aaccb8c..6b3145e 100644 --- a/src/files.ts +++ b/src/files.ts @@ -460,9 +460,14 @@ export const views: { var buffer = new Buffer(10); fs.read(fd, buffer, 0, 10, 0, async function(err, num) { logger.debug(buffer.toString('utf8', 0, num)); - file.originalMimetype = 'image/czi'; + let type: string = buffer.toString('utf8', 0, num); + if (type === 'ZISRAWFILE') { + file.originalMimetype = 'image/zeiss'; + } else { + file.originalMimetype = 'image/lecia'; + } await file.save(); - res(buffer.toString('utf8', 0, num) === 'ZISRAWFILE'); + res(type === 'ZISRAWFILE'); }); }); }); |
