removed debugging code

This commit is contained in:
Abhinav-grd 2021-03-05 16:21:40 +05:30
parent 60567cc596
commit e74689e8af

View file

@ -195,10 +195,7 @@ class UploadService {
); );
let backupedFile: BackupedFile = await this.uploadtoBucket( let backupedFile: BackupedFile = await this.uploadtoBucket(
encryptedFile, encryptedFile,
token, token
worker,
encryptedKey,
collection.key
); );
file = null; file = null;
encryptedFile = null; encryptedFile = null;
@ -376,29 +373,11 @@ class UploadService {
private async uploadtoBucket( private async uploadtoBucket(
file: ProcessedFile, file: ProcessedFile,
token: string, token: string
worker,
enFilekey: B64EncryptionResult,
collectionKey
): Promise<BackupedFile> { ): Promise<BackupedFile> {
try { try {
if (isDataStream(file.file.encryptedData)) { if (isDataStream(file.file.encryptedData)) {
const { chunkCount, stream } = file.file.encryptedData; const { chunkCount, stream } = file.file.encryptedData;
// const fileKey = await worker.decryptB64(
// enFilekey.encryptedData,
// enFilekey.nonce,
// collectionKey
// );
// const resp = await new Response(await stream).arrayBuffer();
// const decryptedFile: any = await worker.decryptFile(
// new Uint8Array(resp),
// await worker.fromB64(file.file.decryptionHeader),
// fileKey
// );
// console.log(decryptedFile);
// let decryptedFileBlob = new Blob([decryptedFile]);
// console.log(URL.createObjectURL(decryptedFileBlob));
// return;
const filePartUploadURLs = await this.fetchMultipartUploadURLs( const filePartUploadURLs = await this.fetchMultipartUploadURLs(
token, token,
Math.ceil(chunkCount / 2) Math.ceil(chunkCount / 2)