diff --git a/docker-compose.yml b/docker-compose.yml index d442d74..1f85ba3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,7 @@ version: "3.9" # ============================================================= -# Dragon Wind β Full Stack -# Services: -# dragon-wind β Main upload web app (port 3000) -# udp-relay β UDP relay server (TCP 3001 + UDP 5000) +# Dragon Wind β Upload Portal # ============================================================= services: @@ -30,30 +27,9 @@ services: - S3_BUCKET=${S3_BUCKET:-} - S3_ACCESS_KEY=${S3_ACCESS_KEY:-} - S3_SECRET_KEY=${S3_SECRET_KEY:-} - # Relay URL for UDP mode - - RELAY_URL=${RELAY_URL:-http://udp-relay:3001} - - UDP_PORT=${UDP_PORT:-5000} # AMPP (optional) - AMPP_BASE_URL=${AMPP_BASE_URL:-https://us-east-1.gvampp.com} - AMPP_API_KEY=${AMPP_API_KEY:-} - depends_on: - - udp-relay - networks: - - dragon-wind-net - - udp-relay: - build: - context: ./udp-relay - dockerfile: Dockerfile - container_name: dragon-wind-relay - restart: unless-stopped - ports: - - "${RELAY_TCP_PORT:-3001}:3001" # Control API (TCP) - - "${RELAY_UDP_PORT:-5000}:5000/udp" # Data transfer (UDP) - environment: - - PORT=3001 - - UDP_PORT=5000 - - MAX_SESSIONS=${MAX_RELAY_SESSIONS:-50} networks: - dragon-wind-net diff --git a/lib/upload-manager.js b/lib/upload-manager.js index 0eb6148..0a64c7b 100644 --- a/lib/upload-manager.js +++ b/lib/upload-manager.js @@ -21,7 +21,9 @@ class UploadManager { createSession({ filename, size, mode = "http", prefix = "" }) { if (!["http", "udp"].includes(mode)) throw new Error("mode must be 'http' or 'udp'"); const sessionId = crypto.randomBytes(16).toString("hex"); - const key = prefix ? `${prefix.replace(/[-\/]+$/, "")}--${filename}` : filename; + // Normalize prefix: UI uses "/" for nested folders, FLX expects "--" as delimiter + const normalized = prefix ? prefix.replace(/\//g, "--").replace(/[-]+$/, "") : ""; + const key = normalized ? `${normalized}--${filename}` : filename; const session = { sessionId, filename, size, mode, key, prefix, status: "pending", diff --git a/public/index.html b/public/index.html index f7a970a..7a4a818 100644 --- a/public/index.html +++ b/public/index.html @@ -464,17 +464,18 @@ body::before{content:'';position:fixed;inset:0;background:radial-gradient(ellips