zek 17.3.74 → 17.3.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/models/file.model.mjs +2 -20
- package/esm2022/lib/utils/base64-helper.mjs +1 -1
- package/esm2022/lib/utils/file.helper.mjs +33 -1
- package/fesm2022/zek.mjs +33 -21
- package/fesm2022/zek.mjs.map +1 -1
- package/lib/models/file.model.d.ts +9 -9
- package/lib/utils/file.helper.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export
|
|
2
|
-
id?:
|
|
1
|
+
export interface IFileBase<TId = number, TContent = string> {
|
|
2
|
+
id?: TId | null;
|
|
3
|
+
key?: string | null;
|
|
3
4
|
fileName?: string | null;
|
|
4
|
-
|
|
5
|
+
extension?: string | null;
|
|
6
|
+
mediaType?: string | null;
|
|
5
7
|
fileSize?: number | null;
|
|
8
|
+
hash?: string | null;
|
|
9
|
+
createDate?: Date | null;
|
|
6
10
|
isDeleted?: boolean | null;
|
|
11
|
+
content?: TContent | null;
|
|
7
12
|
}
|
|
8
|
-
export
|
|
9
|
-
data?: string | null;
|
|
10
|
-
constructor(init?: Partial<FileString>);
|
|
11
|
-
}
|
|
12
|
-
export declare class FileBytes extends FileBase {
|
|
13
|
-
constructor(init?: Partial<FileString>);
|
|
13
|
+
export interface IFileString extends IFileBase<number, string> {
|
|
14
14
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { IFileString } from "../models";
|
|
1
2
|
export declare class FileHelper {
|
|
2
3
|
static getExtension(path?: string | null): string | null | undefined;
|
|
3
4
|
static download(blob: Blob | null, fileName: string): void;
|
|
5
|
+
static fileToDataUrl(file: File): Promise<IFileString>;
|
|
6
|
+
static fileToBase64String(file: File): Promise<IFileString>;
|
|
4
7
|
}
|