From d17f4aa8d91f1fdaed16d7012940ea344fe464ee Mon Sep 17 00:00:00 2001 From: Sosthene Date: Mon, 30 Jun 2025 22:34:26 +0200 Subject: [PATCH] Add FileBlob and FileData --- src/front/Api/Entities/types.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/front/Api/Entities/types.ts diff --git a/src/front/Api/Entities/types.ts b/src/front/Api/Entities/types.ts new file mode 100644 index 00000000..06087a1f --- /dev/null +++ b/src/front/Api/Entities/types.ts @@ -0,0 +1,21 @@ +/** + * FileBlob interface representing a file's binary data and metadata + * Used for file transmission and storage in the application + */ +export interface FileBlob { + /** MIME type of the file (e.g., "application/pdf", "image/jpeg") */ + type: string; + /** Binary data of the file as Uint8Array */ + data: Uint8Array; +} + +/** + * FileData interface representing a complete file object with blob and metadata + * Used when creating or updating files in the system + */ +export interface FileData { + /** The file blob containing type and binary data */ + file_blob: FileBlob; + /** The name of the file */ + file_name: string; +} \ No newline at end of file