@@ -6,10 +6,10 @@ import { Injectable, Logger, HttpStatus } from '@nestjs/common';
66import { AppException } from 'omniboxd/common/exceptions/app.exception' ;
77import { I18nService } from 'nestjs-i18n' ;
88import { Response } from 'express' ;
9- import { MinioService } from 'omniboxd/minio/minio .service' ;
9+ import { S3Service } from 'omniboxd/s3/s3 .service' ;
1010import { PermissionsService } from 'omniboxd/permissions/permissions.service' ;
1111import { ResourcePermission } from 'omniboxd/permissions/resource-permission.enum' ;
12- import { objectStreamResponse } from 'omniboxd/minio /utils' ;
12+ import { objectStreamResponse } from 'omniboxd/s3 /utils' ;
1313import { ResourceAttachmentsService } from 'omniboxd/resource-attachments/resource-attachments.service' ;
1414import {
1515 UploadAttachmentsResponseDto ,
@@ -24,7 +24,7 @@ export class AttachmentsService {
2424 private readonly logger = new Logger ( AttachmentsService . name ) ;
2525
2626 constructor (
27- private readonly minioService : MinioService ,
27+ private readonly s3Service : S3Service ,
2828 private readonly permissionsService : PermissionsService ,
2929 private readonly resourceAttachmentsService : ResourceAttachmentsService ,
3030 private readonly sharesService : SharesService ,
@@ -50,7 +50,7 @@ export class AttachmentsService {
5050 }
5151 }
5252
53- minioPath ( attachmentId : string ) : string {
53+ s3Path ( attachmentId : string ) : string {
5454 return `attachments/${ attachmentId } ` ;
5555 }
5656
@@ -69,7 +69,7 @@ export class AttachmentsService {
6969 ResourcePermission . CAN_EDIT ,
7070 ) ;
7171
72- const id = await this . minioService . put ( filename , buffer , mimetype , {
72+ const id = await this . s3Service . put ( filename , buffer , mimetype , {
7373 folder : 'attachments' ,
7474 } ) ;
7575
@@ -148,8 +148,8 @@ export class AttachmentsService {
148148 attachmentId ,
149149 ) ;
150150
151- const objectResponse = await this . minioService . get (
152- this . minioPath ( attachmentId ) ,
151+ const objectResponse = await this . s3Service . get (
152+ this . s3Path ( attachmentId ) ,
153153 ) ;
154154
155155 // Display media files inline, download other files as attachments
@@ -198,8 +198,8 @@ export class AttachmentsService {
198198 attachmentId ,
199199 ) ;
200200
201- const objectResponse = await this . minioService . get (
202- this . minioPath ( attachmentId ) ,
201+ const objectResponse = await this . s3Service . get (
202+ this . s3Path ( attachmentId ) ,
203203 ) ;
204204
205205 // Display media files inline, download other files as attachments
0 commit comments