Inline and skip

This commit is contained in:
Manav Rathi 2024-04-23 16:06:53 +05:30
parent 5e5d66c2a2
commit c5ab1811fb
No known key found for this signature in database

View file

@ -49,7 +49,7 @@ import {
updateMagicMetadata,
} from "utils/magicMetadata";
import { readStream } from "utils/native-stream";
import { findMatchingExistingFiles, hasFileHash } from "utils/upload";
import { hasFileHash } from "utils/upload";
import { getFileStream } from "../readerService";
import { getFileType } from "../typeDetectionService";
import {
@ -132,14 +132,6 @@ class UploadService {
);
}
async encryptAsset(
worker: Remote<DedicatedCryptoWorker>,
file: FileWithMetadata,
encryptionKey: string,
): Promise<EncryptedFile> {
return encryptFile(worker, file, encryptionKey);
}
async uploadToBucket(
logger: Logger,
file: ProcessedFile,
@ -397,8 +389,8 @@ export async function uploader(
if (uploadCancelService.isUploadCancelationRequested()) {
throw Error(CustomError.UPLOAD_CANCELLED);
}
log.info(`encryptAsset ${fileNameSize}`);
const encryptedFile = await uploadService.encryptAsset(
log.info(`encryptFile ${fileNameSize}`);
const encryptedFile = await encryptFile(
worker,
fileWithMetadata,
collection.key,