generated from VLADIMIR/template
fix filenames
This commit is contained in:
@@ -3,6 +3,7 @@ package file_service
|
||||
import (
|
||||
"context"
|
||||
"evening_detective_server/internal/modules/file_storage"
|
||||
"evening_detective_server/internal/modules/string_tools"
|
||||
)
|
||||
|
||||
type FileService struct {
|
||||
@@ -21,6 +22,7 @@ func (s *FileService) UploadFile(
|
||||
ctx context.Context,
|
||||
file *file_storage.File,
|
||||
) (string, error) {
|
||||
file.Name = string_tools.Transliterate(file.Name)
|
||||
if err := s.fileStorage.Put(ctx, file); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user