@tstdl/base 0.92.105 → 0.92.106

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.
@@ -71,6 +71,8 @@ export declare class DocumentManagementService extends DocumentManagementService
71
71
  loadDocument(id: string): Promise<Document>;
72
72
  loadDocumentFile(id: string): Promise<DocumentFile>;
73
73
  loadType(id: string): Promise<DocumentType>;
74
+ getFileContent(fileId: string): Promise<Uint8Array>;
75
+ getFileContentStream(fileId: string): ReadableStream<Uint8Array>;
74
76
  getFileContentUrl(fileId: string, title: string | null, download?: boolean): Promise<string>;
75
77
  createCategory(parameters: CreateDocumentCategoryParameters): Promise<DocumentCategory>;
76
78
  createType(parameters: CreateDocumentTypeParameters): Promise<DocumentType>;
@@ -250,6 +250,14 @@ let DocumentManagementService = DocumentManagementService_1 = class DocumentMana
250
250
  async loadType(id) {
251
251
  return this.documentTypeService.load(id);
252
252
  }
253
+ async getFileContent(fileId) {
254
+ const key = getDocumentFileKey(fileId);
255
+ return this.fileObjectStorage.getContent(key);
256
+ }
257
+ getFileContentStream(fileId) {
258
+ const key = getDocumentFileKey(fileId);
259
+ return this.fileObjectStorage.getContentStream(key);
260
+ }
253
261
  async getFileContentUrl(fileId, title, download = false) {
254
262
  const file = await this.documentFileService.load(fileId);
255
263
  return this.getDocumentFileContentObjectUrl(title ?? fileId, file, download);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.92.105",
3
+ "version": "0.92.106",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"