From 99f8fdb4e9457a2a6247cef207e922877a909401 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Sat, 27 Mar 2021 21:04:31 -0500 Subject: [PATCH 1/2] Use file upload service for file uploads --- src/app/services.module.ts | 5 +++-- src/app/vault/attachments.component.ts | 5 +++-- src/locales/en/messages.json | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/app/services.module.ts b/src/app/services.module.ts index 31d5e13e43..eb21c8f3e2 100644 --- a/src/app/services.module.ts +++ b/src/app/services.module.ts @@ -105,12 +105,12 @@ const tokenService = new TokenService(storageService); const appIdService = new AppIdService(storageService); const apiService = new ApiService(tokenService, platformUtilsService, async (expired: boolean) => messagingService.send('logout', { expired: expired })); -const fileUploadService: FileUploadServiceAbstraction = new FileUploadService(logService, apiService); const userService = new UserService(tokenService, storageService); const settingsService = new SettingsService(userService, storageService); export let searchService: SearchService = null; +const fileUploadService = new FileUploadService(logService, apiService); const cipherService = new CipherService(cryptoService, userService, settingsService, - apiService, storageService, i18nService, () => searchService); + apiService, fileUploadService, storageService, i18nService, () => searchService); const folderService = new FolderService(cryptoService, userService, apiService, storageService, i18nService, cipherService); const collectionService = new CollectionService(cryptoService, userService, storageService, i18nService); @@ -224,6 +224,7 @@ export function initFactory(): Function { { provide: SendServiceAbstraction, useValue: sendService }, { provide: CryptoFunctionServiceAbstraction, useValue: cryptoFunctionService }, { provide: NativeMessagingService, useValue: nativeMessagingService }, + { provide: FileUploadServiceAbstraction, useValue: fileUploadService }, { provide: APP_INITIALIZER, useFactory: initFactory, diff --git a/src/app/vault/attachments.component.ts b/src/app/vault/attachments.component.ts index 16dfdf8241..ef5dc9497b 100644 --- a/src/app/vault/attachments.component.ts +++ b/src/app/vault/attachments.component.ts @@ -1,5 +1,6 @@ import { Component } from '@angular/core'; +import { ApiService } from 'jslib/abstractions/api.service'; import { CipherService } from 'jslib/abstractions/cipher.service'; import { CryptoService } from 'jslib/abstractions/crypto.service'; import { I18nService } from 'jslib/abstractions/i18n.service'; @@ -15,7 +16,7 @@ import { AttachmentsComponent as BaseAttachmentsComponent } from 'jslib/angular/ export class AttachmentsComponent extends BaseAttachmentsComponent { constructor(cipherService: CipherService, i18nService: I18nService, cryptoService: CryptoService, userService: UserService, - platformUtilsService: PlatformUtilsService) { - super(cipherService, i18nService, cryptoService, userService, platformUtilsService, window); + platformUtilsService: PlatformUtilsService, apiService: ApiService) { + super(cipherService, i18nService, cryptoService, userService, platformUtilsService, apiService, window); } } diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 49f6cbded9..ead20bfbdc 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -431,7 +431,7 @@ "message": "Select a file." }, "maxFileSize": { - "message": "Maximum file size is 100 MB." + "message": "Maximum file size is 500 MB." }, "updateKey": { "message": "You cannot use this feature until you update your encryption key." From 5701275c22665d4aee6f841945ad5597280acf4d Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Mon, 29 Mar 2021 08:24:18 -0500 Subject: [PATCH 2/2] Update jslib --- jslib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jslib b/jslib index 0735569479..5c961ce847 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 07355694792999042e6373ebd1b3571329a969cc +Subproject commit 5c961ce847dd9ba13784ff9ba268753aae3a8c2e