From a75d40918b7e56c0a27115a8a84272de128a22cb Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Wed, 16 Oct 2024 13:34:40 +0530 Subject: [PATCH] feat: !upload run binary output from Run model --- server/src/models/Run.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/server/src/models/Run.ts b/server/src/models/Run.ts index 332fc059..93e3c924 100644 --- a/server/src/models/Run.ts +++ b/server/src/models/Run.ts @@ -42,19 +42,6 @@ class Run extends Model implements RunAttr public serializableOutput!: Record; public binaryOutput!: Record; - public async uploadBinaryOutputToMinioBucket(key: string, data: Buffer): Promise { - const bucketName = 'maxun-run-screenshots'; - try { - console.log(`Uploading to bucket ${bucketName} with key ${key}`); - await minioClient.putObject(bucketName, key, data, data.length, { 'Content-Type': 'image/png' }); - this.binaryOutput[key] = `minio://${bucketName}/${key}`; - console.log(`Successfully uploaded to MinIO: minio://${bucketName}/${key}`); - } catch (error) { - console.error(`Error uploading to MinIO bucket: ${bucketName} with key: ${key}`, error); - throw error; - } - } - public async getBinaryOutputFromMinioBucket(key: string): Promise { const bucketName = 'maxun-run-screenshots';