Added Cloudflare R2 media storage support
Build and Publish / Build and Publish Docker Image (push) Successful in 1m44s

This commit is contained in:
Aleksandr Bogomiakov
2026-08-09 01:05:47 +01:00
parent 9ee5048a43
commit 15c9528f47
14 changed files with 885 additions and 116 deletions
+17 -2
View File
@@ -303,6 +303,11 @@ pub struct Translations {
pub media_delete: &'static str,
pub media_delete_confirm: &'static str,
pub media_all_clients: &'static str,
pub media_files_selected: &'static str,
pub media_upload_sending: &'static str,
pub media_upload_processing: &'static str,
pub media_upload_done: &'static str,
pub media_upload_connection_error: &'static str,
// Client portal
pub portal_title: &'static str,
@@ -429,7 +434,7 @@ static RU: Translations = Translations {
settings_r2_access_key_id: "R2 Access Key ID",
settings_r2_secret_access_key: "R2 Secret Access Key",
settings_r2_secret_unchanged: "Секрет уже сохранён; оставьте поле пустым, чтобы не менять его",
settings_r2_migration_help: "Порядок перехода: сохраните реквизиты с выключенным R2, выполните в контейнере migrate_uploads_to_r2, затем включите R2 и отключите PVC. Для бакета разрешите CORS GET/HEAD с домена сайта и заголовок Range.",
settings_r2_migration_help: "Порядок перехода: сохраните реквизиты с выключенным R2, выполните в контейнере migrate_uploads_to_r2 и normalize_videos_to_r2, затем включите R2 и отключите PVC. Для бакета разрешите CORS GET/HEAD с домена сайта и заголовок Range.",
settings_r2_error_incomplete: "R2 не включён: проверьте Account ID, имя бакета, Access Key ID и Secret Access Key.",
settings_client_notifications_enabled: "Разрешить клиентам браузерные уведомления",
settings_client_notifications_help: "Показывает клиентам настройку уведомлений о завершённых визитах.",
@@ -463,6 +468,11 @@ static RU: Translations = Translations {
media_delete: "Удалить",
media_delete_confirm: "Удалить этот файл?",
media_all_clients: "Все клиенты",
media_files_selected: "Выбрано файлов",
media_upload_sending: "Загрузка на сервер...",
media_upload_processing: "Конвертация и загрузка в R2...",
media_upload_done: "Готово — обновляем медиагалерею...",
media_upload_connection_error: "Ошибка соединения",
portal_title: "Визиты",
portal_upcoming: "Предстоящие визиты",
@@ -689,7 +699,7 @@ static EN: Translations = Translations {
settings_r2_access_key_id: "R2 Access Key ID",
settings_r2_secret_access_key: "R2 Secret Access Key",
settings_r2_secret_unchanged: "A secret is already stored; leave this blank to keep it unchanged",
settings_r2_migration_help: "Migration order: save the credentials with R2 disabled, run migrate_uploads_to_r2 inside the container, then enable R2 and detach the PVC. Allow CORS GET/HEAD from the site domain and the Range header on the bucket.",
settings_r2_migration_help: "Migration order: save the credentials with R2 disabled, run migrate_uploads_to_r2 and normalize_videos_to_r2 inside the container, then enable R2 and detach the PVC. Allow CORS GET/HEAD from the site domain and the Range header on the bucket.",
settings_r2_error_incomplete: "R2 was not enabled: check the Account ID, bucket name, Access Key ID, and Secret Access Key.",
settings_client_notifications_enabled: "Allow client browser notifications",
settings_client_notifications_help: "Shows clients the completed-visit notification setting.",
@@ -723,6 +733,11 @@ static EN: Translations = Translations {
media_delete: "Delete",
media_delete_confirm: "Delete this file?",
media_all_clients: "All clients",
media_files_selected: "Files selected",
media_upload_sending: "Uploading to the server...",
media_upload_processing: "Converting and uploading to R2...",
media_upload_done: "Done — refreshing the media gallery...",
media_upload_connection_error: "Connection error",
portal_title: "Visits",
portal_upcoming: "Upcoming visits",