Extract logic into transcribe service

This commit is contained in:
2025-08-12 10:59:51 +03:00
parent f625e21418
commit 2c9a5f4bfb
8 changed files with 354 additions and 356 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"os"
"strings"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
@@ -78,3 +79,9 @@ func (s *S3Service) UploadFile(filePath, fileName string) error {
return nil
}
func (s *S3Service) FileUrl(fileName string) string {
endpoint := strings.TrimRight(os.Getenv("S3_ENDPOINT"), "/")
bucketName := os.Getenv("S3_BUCKET_NAME")
return fmt.Sprintf("%s/%s/%s", endpoint, bucketName, fileName)
}