feat: use client-friendly public file links
This commit is contained in:
@@ -24,8 +24,10 @@
|
|||||||
- `POST /api/nodes/{id}/public-links`
|
- `POST /api/nodes/{id}/public-links`
|
||||||
- `GET /public/{token}` внутри сервиса
|
- `GET /public/{token}` внутри сервиса
|
||||||
- `GET /public/{token}/download` внутри сервиса
|
- `GET /public/{token}/download` внутри сервиса
|
||||||
- `GET /api/files/public/{token}` через Portal proxy
|
- `GET /files/share/{token}` через Portal proxy — красивая публичная ссылка для клиентов
|
||||||
- `GET /api/files/public/{token}/download` через 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
|
||||||
|
|
||||||
## Миграционный путь
|
## Миграционный путь
|
||||||
|
|
||||||
|
|||||||
@@ -652,7 +652,7 @@ func (h *NodeHandler) renderPublicUnavailable(w http.ResponseWriter, node *model
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *NodeHandler) publicURL(token string) string {
|
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 {
|
func (h *NodeHandler) publicNodeURL(token, nodeID string) string {
|
||||||
|
|||||||
Reference in New Issue
Block a user