Add "Download All in ZIP" feature for session downloads
Introduce automatic ZIP file creation and management for session-based downloads. - Server: Add endpoints to serve and provide info about session ZIPs; VideoService now updates ZIP after each MP3 download with user-friendly filenames. - Client: Add "Download All in ZIP" button with loading state and ZIP info; trigger browser download via JS interop; responsive and styled UI. - API: Extend service interfaces for ZIP download/info; add SessionZipInfo model. - Docs: Update SESSION_MANAGEMENT.md with ZIP workflow, endpoints, and UX details. - Robust error handling and logging throughout.
This commit is contained in:
@@ -66,9 +66,20 @@ app.MapGet("/", (IWebHostEnvironment env) => new
|
||||
get_result = "/api/video/result/{jobId}",
|
||||
download = "/api/download/{jobId}",
|
||||
download_by_session = "/api/download/{sessionId}/{jobId}",
|
||||
download_session_zip = "/api/download/zip/{sessionId}",
|
||||
session_zip_info = "/api/download/zip/info/{sessionId}",
|
||||
session_create = "/api/session/create",
|
||||
session_validate = "/api/session/validate/{sessionId}",
|
||||
static_files = "/downloads/{fileName}",
|
||||
openapi = "/openapi/v1.json"
|
||||
},
|
||||
features = new
|
||||
{
|
||||
session_management = true,
|
||||
automatic_zip_creation = true,
|
||||
session_based_organization = true,
|
||||
backward_compatibility = true
|
||||
},
|
||||
testing = new
|
||||
{
|
||||
httpFile = "Use api-tests.http to test endpoints",
|
||||
@@ -88,5 +99,6 @@ app.Logger.LogInformation("?? Health check: /api/health");
|
||||
app.Logger.LogInformation("?? API info: /");
|
||||
app.Logger.LogInformation("?? Static files served from: /downloads/*");
|
||||
app.Logger.LogInformation("?? Session-based downloads supported");
|
||||
app.Logger.LogInformation("?? Automatic ZIP file creation enabled");
|
||||
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user