feat: use client-friendly public file links
All checks were successful
CI / hygiene (push) Successful in 2s
Build and Deploy / build-and-deploy (push) Successful in 31s
CI / test (push) Successful in 21s

This commit is contained in:
Grendgi
2026-06-16 17:10:31 +03:00
parent 47d4c2eb95
commit dfbceb4bcd
2 changed files with 5 additions and 3 deletions

View File

@@ -24,8 +24,10 @@
- `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
- `GET /files/share/{token}` через Portal proxy — красивая публичная ссылка для клиентов
- `GET /files/share/{token}/download` через Portal proxy
- `GET /api/files/public/{token}` через Portal proxy — legacy URL для уже выданных ссылок
- `GET /api/files/public/{token}/download` через Portal proxy — legacy URL
## Миграционный путь

View File

@@ -652,7 +652,7 @@ func (h *NodeHandler) renderPublicUnavailable(w http.ResponseWriter, node *model
}
func (h *NodeHandler) publicURL(token string) string {
return strings.TrimRight(h.cfg.PublicBaseURL, "/") + "/api/files/public/" + token
return strings.TrimRight(h.cfg.PublicBaseURL, "/") + "/files/share/" + token
}
func (h *NodeHandler) publicNodeURL(token, nodeID string) string {