remove type attribute from ElectronFile

This commit is contained in:
Rushikesh Tote 2022-03-24 11:41:04 +05:30
parent b88e78a413
commit 22684f8949
4 changed files with 0 additions and 15 deletions

View file

@ -68,7 +68,6 @@
"electron-log": "^4.3.5",
"electron-store": "^8.0.1",
"electron-updater": "^4.3.8",
"mime": "^3.0.0",
"next-electron-server": "^0.0.8",
"promise-fs": "^2.1.1"
}

View file

@ -3,10 +3,6 @@ export interface ElectronFile {
path: string;
size: number;
lastModified: number;
type: {
mimeType: string;
ext: string;
};
stream: () => Promise<ReadableStream<Uint8Array>>;
blob: () => Promise<Blob>;
arrayBuffer: () => Promise<Uint8Array>;

View file

@ -1,7 +1,6 @@
import Store, { Schema } from 'electron-store';
import path from 'path';
import * as fs from 'promise-fs';
import mime from 'mime';
import { FILE_STREAM_CHUNK_SIZE } from '../../config';
import { ElectronFile, StoreType } from '../types';
@ -87,10 +86,6 @@ export async function getElectronFile(filePath: string): Promise<ElectronFile> {
name: path.basename(filePath),
size: fileStats.size,
lastModified: fileStats.mtime.valueOf(),
type: {
mimeType: mime.getType(filePath),
ext: path.extname(filePath).substring(1),
},
stream: async () => {
return await getFileStream(filePath);
},

View file

@ -2518,11 +2518,6 @@ mime@^2.5.2:
resolved "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz"
integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==
mime@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7"
integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==
mimic-fn@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"