We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c890949 commit cd87fc3Copy full SHA for cd87fc3
src/modules/storage/storage.service.ts
@@ -35,11 +35,16 @@ export class StorageService{
35
const fileName: string = this.getFileName(sum);
36
this.logger.verbose(`Uploading file ${fileName}`);
37
let file: BunFile | S3File;
38
- if(this.s3Client)
+ if(this.s3Client){
39
file = this.s3Client.file(fileName);
40
- else
+ await file.write(data, {
41
+ // @ts-ignore
42
+ storageClass: process.env.S3_STORAGE_CLASS || "STANDARD",
43
+ });
44
+ }else{
45
file = Bun.file(fileName);
- await file.write(data);
46
+ await file.write(data);
47
+ }
48
return sum;
49
}
50
0 commit comments