diff --git a/apps/red-ui/src/app/modules/projects/services/pdf-viewer-data.service.ts b/apps/red-ui/src/app/modules/projects/services/pdf-viewer-data.service.ts index ad42e06a6..8cee58bd0 100644 --- a/apps/red-ui/src/app/modules/projects/services/pdf-viewer-data.service.ts +++ b/apps/red-ui/src/app/modules/projects/services/pdf-viewer-data.service.ts @@ -1,13 +1,12 @@ import { Injectable } from '@angular/core'; import { forkJoin, Observable, of } from 'rxjs'; -import { map, tap } from 'rxjs/operators'; +import { catchError, map } from 'rxjs/operators'; import { FileManagementControllerService, ManualRedactionControllerService, RedactionLogControllerService, ViewedPagesControllerService } from '@redaction/red-ui-http'; -import { FileType } from '../../../models/file/file-type'; import { FileDataModel } from '../../../models/file/file-data.model'; import { AppStateService } from '../../../state/app-state.service'; import { PermissionsService } from '../../../services/permissions.service'; @@ -31,10 +30,9 @@ export class PdfViewerDataService { loadActiveFileData(): Observable { const fileObs = this.downloadOriginalFile(this._appStateService.activeFile); const reactionLogObs = this._redactionLogControllerService.getRedactionLog(this._appStateService.activeProjectId, this._appStateService.activeFileId); - const redactionChangeLogObs = this._redactionLogControllerService.getRedactionChangeLog( - this._appStateService.activeProjectId, - this._appStateService.activeFileId - ); + const redactionChangeLogObs = this._redactionLogControllerService + .getRedactionChangeLog(this._appStateService.activeProjectId, this._appStateService.activeFileId) + .pipe(catchError(() => of({}))); const manualRedactionsObs = this._manualRedactionControllerService.getManualRedaction( this._appStateService.activeProjectId, this._appStateService.activeFileId diff --git a/apps/red-ui/src/app/modules/upload-download/services/file-upload.service.ts b/apps/red-ui/src/app/modules/upload-download/services/file-upload.service.ts index 64d698a54..9f75932aa 100644 --- a/apps/red-ui/src/app/modules/upload-download/services/file-upload.service.ts +++ b/apps/red-ui/src/app/modules/upload-download/services/file-upload.service.ts @@ -46,7 +46,7 @@ export class FileUploadService { } async uploadFiles(files: FileUploadModel[]): Promise { - const maxSizeMB = this._appConfigService.getConfig(AppConfigKey.MAX_FILE_SIZE_MB, 50); + const maxSizeMB = this._appConfigService.getConfig(AppConfigKey.MAX_FILE_SIZE_MB, 100); const maxSizeBytes = maxSizeMB * 1024 * 1024; const projectFiles = this._appStateService.activeProject.files; let option: 'overwrite' | 'skip' | undefined; diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index 5d0a93494..478b507aa 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -9,5 +9,6 @@ "LICENSE_EMAIL": "todo-license@email.com", "LICENSE_START": "01-01-2021", "LICENSE_END": "31-12-2021", - "LICENSE_PAGE_COUNT": 1000000 + "LICENSE_PAGE_COUNT": 1000000, + "MAX_FILE_SIZE_MB": 100 }