This commit is contained in:
2026-10-03 13:00:50 +07:00
parent dd55079e06
commit 7a7808b4d1
28 changed files with 191 additions and 11 deletions
@@ -41,11 +41,13 @@ var allowedExtensions = map[string]struct{}{
".webm": {},
}
// FileService handles file downloads.
type FileService struct {
fileStorage file_storage.IFileStorage
maxFileSize int
}
// NewFileService creates a file service.
func NewFileService(
fileStorage file_storage.IFileStorage,
maxFileSize int,
@@ -149,6 +151,7 @@ func contentTypeCategory(sniffed string) string {
}
}
// DownloadFile returns a file for download.
func (s *FileService) DownloadFile(
ctx context.Context,
filename string,