mirror of
https://github.com/bitwarden/browser
synced 2026-03-01 19:11:22 +00:00
Build with the ability to create attachments without keys
This commit is contained in:
@@ -1096,15 +1096,15 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
|
||||
const encFileName = await this.encryptService.encryptString(filename, cipherEncKey);
|
||||
|
||||
const dataEncKey = await this.keyService.makeDataEncKey(cipherEncKey);
|
||||
const encData = await this.encryptService.encryptFileData(new Uint8Array(data), dataEncKey[0]);
|
||||
// const dataEncKey = await this.keyService.makeDataEncKey(cipherEncKey);
|
||||
const encData = await this.encryptService.encryptFileData(new Uint8Array(data), cipherEncKey);
|
||||
|
||||
const response = await this.cipherFileUploadService.upload(
|
||||
cipher,
|
||||
encFileName,
|
||||
encData,
|
||||
admin,
|
||||
dataEncKey,
|
||||
null, //dataEncKey,
|
||||
);
|
||||
|
||||
const cData = new CipherData(response, cipher.collectionIds);
|
||||
|
||||
@@ -29,7 +29,8 @@ export class CipherFileUploadService implements CipherFileUploadServiceAbstracti
|
||||
dataEncKey: [SymmetricCryptoKey, EncString],
|
||||
): Promise<CipherResponse> {
|
||||
const request: AttachmentRequest = {
|
||||
key: dataEncKey[1].encryptedString,
|
||||
// key: dataEncKey[1].encryptedString,
|
||||
key: undefined as any,
|
||||
fileName: encFileName.encryptedString,
|
||||
fileSize: encData.buffer.byteLength,
|
||||
adminRequest: admin,
|
||||
|
||||
Reference in New Issue
Block a user