Add upload cleanup functionality and improve error handling for media uploads
ci / build-backend (push) Successful in 2m3s
ci / build-frontend (push) Successful in 44s
ci / tests (push) Successful in 2m39s
ci / sonar (push) Successful in 5m50s

Implemented a new background service, UploadsCleanupBackgroundService, to manage stale uploads in the uploads directory. Enhanced error handling in the media upload process to ensure incomplete uploads are deleted immediately upon failure, preventing unnecessary storage usage. Updated the .env.example and StorageOptions to include configuration for stale upload retention time. Improved documentation to reflect these changes and clarify the upload process.
This commit is contained in:
Leonid Pershin
2026-07-27 02:56:15 +03:00
parent 986f7ff52d
commit a8b5a8f693
11 changed files with 301 additions and 17 deletions
@@ -170,7 +170,9 @@ export function ShowDetail({ showId }: Readonly<{ showId: string }>) {
audienceMutation.mutate(v === AUDIENCE_UNSET ? null : (v as ShowAudience))
}
>
<SelectTrigger className="h-7 w-48">
{/* Ширина под самую длинную расшифровку рейтинга («NC-17 — только взрослым»):
у́же — и она переносится на вторую строку, ломая высоту строки заголовка. */}
<SelectTrigger className="h-7 w-64 whitespace-nowrap">
<SelectValue />
</SelectTrigger>
<SelectContent>
@@ -118,7 +118,8 @@ export function ShowsPanel() {
value={audience ?? AUDIENCE_UNSET}
onValueChange={(v) => setAudience(v === AUDIENCE_UNSET ? null : (v as ShowAudience))}
>
<SelectTrigger className="w-48">
{/* Та же ширина, что у селекта на карточке шоу: расшифровки рейтингов длинные. */}
<SelectTrigger className="w-64 whitespace-nowrap">
<SelectValue />
</SelectTrigger>
<SelectContent>