feat: Implement ZIP RAG import functionality with background processing

- Added support for ZIP RAG import in the asset management system.
- Introduced a new background task type for ZIP RAG imports.
- Enhanced the asset import process to allow for optional development processing.
- Updated the UI to reflect the new RAG processing status and options.
- Created database migration for background tasks related to ZIP RAG imports.
- Refactored asset handling to support FLV normalization and improved error handling.
- Added new API endpoints and updated existing ones to accommodate changes.
This commit is contained in:
2026-04-17 12:51:50 -04:00
parent ccea101a5e
commit a3467d22d3
9 changed files with 821 additions and 153 deletions
+23 -4
View File
@@ -3,11 +3,30 @@
# Allow large ZIP uploads (RAG bulk import can exceed 2GB).
client_max_body_size 4096m;
client_body_timeout 1800s;
client_body_timeout 43200s;
# API routes that need to go to port 3001
# Prefer the explicit `/cms-api/*` prefix for frontend fetches. This avoids collisions
# with Next.js pages like `/courses` and `/admin` that share the same host.
location = /cms-api/api/assets/import-zip {
# Upload/import of large ZIPs can run for several minutes.
# Keep this route unbuffered and with very high upstream timeouts.
rewrite ^/cms-api/(.*)$ /$1 break;
proxy_pass http://openccb-studio:3001;
proxy_request_buffering off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_connect_timeout 7200s;
proxy_send_timeout 43200s;
proxy_read_timeout 43200s;
send_timeout 43200s;
}
location /cms-api/ {
# CORS safety net at proxy level for CMS API.
set $cors_origin "";
@@ -42,9 +61,9 @@ location /cms-api/ {
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_connect_timeout 300s;
proxy_send_timeout 7200s;
proxy_read_timeout 7200s;
send_timeout 7200s;
proxy_send_timeout 43200s;
proxy_read_timeout 43200s;
send_timeout 43200s;
}
location /lms-api/ {