Add upload cleanup functionality and improve error handling for media uploads
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:
1 parent
986f7ff52d
commit
a8b5a8f693
11 files changed
+301
-17
No files matched your search
@@ -32,6 +32,9 @@ Storage__LiveWindowSegments=10
|
||||
Storage__KeepOriginals=false
|
||||
# Порог свободного места, ниже которого загрузка отклоняется (10 ГБ).
|
||||
Storage__MinFreeSpaceBytes=10737418240
|
||||
# Через сколько часов простоя убирать брошенное в uploads/ (след оборванной заливки или рестарта
|
||||
# посреди неё). Идущую загрузку не задевает — отсчёт от времени последней записи. 0 — не убирать.
|
||||
# Storage__StaleUploadHours=24
|
||||
# TTL stream-токена (cookie tw_stream), минуты. Короткий срок ограничивает окно доступа после
|
||||
# блокировки/логаута; фронт перевыпускает cookie, пока идёт просмотр. По умолчанию 30.
|
||||
# Storage__StreamTokenMinutes=30
|
||||
|
||||
Reference in new issue
Block a user