Grendgi 2723f20ab0
All checks were successful
CI / hygiene (push) Successful in 1s
Build and Deploy / build-and-deploy (push) Successful in 29s
CI / test (push) Successful in 19s
fix: support files proxy root paths
2026-06-16 13:57:55 +03:00
2026-06-16 12:41:36 +03:00
2026-06-16 12:49:47 +03:00
2026-06-16 12:41:36 +03:00
2026-06-16 12:41:36 +03:00
2026-06-16 12:51:05 +03:00

Files Service

Единый сервис файлов Portal: папки, документы Office, Google-ссылки, PDF/медиа, доступы и временные ссылки.

Что уже заложено

  • files_nodes — дерево папок и файлов.
  • files_access — прямой доступ view/edit, наследуется от родительских папок.
  • files_public_links — временные ссылки на просмотр/скачивание.
  • MinIO-хранилище для бинарных файлов.
  • InternalAuth через Portal (X-Internal-Key, X-User-Id).

Основные API

  • GET /api/nodes?scope=my|shared&parent_id=<uuid>
  • POST /api/folders
  • POST /api/files multipart: file, parent_id, title
  • GET /api/nodes/{id}
  • PATCH /api/nodes/{id}
  • DELETE /api/nodes/{id}
  • GET /api/nodes/{id}/download
  • GET /api/nodes/{id}/access
  • PUT /api/nodes/{id}/access
  • POST /api/nodes/{id}/public-links
  • GET /public/{token} внутри сервиса
  • GET /public/{token}/download внутри сервиса
  • GET /api/files/public/{token} через Portal proxy
  • GET /api/files/public/{token}/download через Portal proxy

Миграционный путь

  1. Подключить proxy Portal /api/files/* к этому сервису.
  2. Сделать новый UI Файлы: Мои файлы и Доступные мне.
  3. Перенести старые office_documents и google_sheets в files_nodes.
  4. После проверки выключить старые /api/office и /api/sheets.
Description
No description provided
Readme 212 KiB
Languages
Go 97%
PLpgSQL 2.2%
Shell 0.8%