1. Liệt kê danh sách tệp (theo quyền User/Admin)
GET /api/filescurl -s "http://localhost:8080/api/files" \ -H "Authorization: Bearer <YOUR_BEARER_TOKEN>"
Sử dụng Session Token hiện tại của bạn hoặc X-API-Key để tự động hóa việc tải lên, liệt kê và tải xuống tệp từ terminal hoặc ứng dụng CI/CD bên ngoài.
curl -s "http://localhost:8080/api/files" \ -H "Authorization: Bearer <YOUR_BEARER_TOKEN>"
curl -X POST "http://localhost:8080/api/upload" \ -H "Authorization: Bearer <YOUR_BEARER_TOKEN>" \ -F "path=media/video.mp4" \ -F "file=@./video.mp4"
curl -X PUT "http://localhost:8080/api/files" \
-H "Authorization: Bearer <YOUR_BEARER_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"old_path":"media/video.mp4","new_path":"archive/video-2026.mp4"}'curl -L "http://localhost:8080/api/download?path=111.mp4" \ -H "Authorization: Bearer <YOUR_BEARER_TOKEN>" \ -o 111.mp4