From de3a9dcc52205ee7e4fe9762449a7bb048bdde3e Mon Sep 17 00:00:00 2001 From: Robin Genz Date: Sun, 20 Oct 2024 17:37:06 +0200 Subject: [PATCH] chore: remove unnecessary code --- src/types/app-bundle.ts | 5 ----- src/utils/buffer.ts | 15 --------------- 2 files changed, 20 deletions(-) diff --git a/src/types/app-bundle.ts b/src/types/app-bundle.ts index 0df1245..21bf4d4 100644 --- a/src/types/app-bundle.ts +++ b/src/types/app-bundle.ts @@ -19,11 +19,6 @@ export interface DeleteAppBundleDto { appId: string; } -export interface MultipartUploadDto { - key: string; - uploadId: string; -} - export interface UpdateAppBundleDto { appBundleFileId?: string; appBundleId: string; diff --git a/src/utils/buffer.ts b/src/utils/buffer.ts index d76fcfc..a3bedca 100644 --- a/src/utils/buffer.ts +++ b/src/utils/buffer.ts @@ -1,20 +1,5 @@ import { ReadStream } from 'fs'; -export const createBufferFromBlob = async (blob: Blob): Promise => { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onload = () => { - if (reader.result instanceof ArrayBuffer) { - resolve(Buffer.from(reader.result)); - } else { - reject(new Error('Failed to convert Blob to Buffer.')); - } - }; - reader.onerror = reject; - reader.readAsArrayBuffer(blob); - }); -}; - export const createBufferFromPath = async (path: string): Promise => { const fs = await import('fs'); const stream = fs.createReadStream(path);