This commit is contained in:
@@ -102,10 +102,8 @@ func (s *S3Service) UploadFileWithName(fileHeader *multipart.FileHeader, folder,
|
||||
}
|
||||
|
||||
// GetFile récupère un objet depuis RustFS (stream + content-type) pour le proxy.
|
||||
func (s *S3Service) GetFile(key string) (io.ReadCloser, string, error) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
defer cancel()
|
||||
|
||||
// Le contexte doit rester actif pendant toute la lecture du body par l'appelant.
|
||||
func (s *S3Service) GetFile(ctx context.Context, key string) (io.ReadCloser, string, error) {
|
||||
out, err := s.client.GetObject(ctx, &s3.GetObjectInput{
|
||||
Bucket: aws.String(s.bucketName),
|
||||
Key: aws.String(key),
|
||||
|
||||
Reference in New Issue
Block a user