Skip to content

Files and Stream

leanwrldd edited this page Sep 10, 2026 · 3 revisions

← Back to Home

Files & Stream

Comp Channels

The file tree can be split into multiple comp channels (comp, comp_alrdywrld, …) — each its own root on disk, with its own staging/archive folders and its own edit-proposal and comp-file-proposal queues. Editor/contributor/manager access is a per-channel membership, not just the old global profile flags (see Roles on the Auth & Accounts page). These are a completely separate system from News channels (News page) — different slugs, different roles, different storage; ?channel= means something different depending which endpoint it's on.

Every endpoint on this page accepts an optional channel param (query string on GET, JSON/form field on POST) — omit it, or pass an unrecognized slug, and the API falls back to the primary channel. Paths are always relative to that one channel's root, never across trees.

GET /files/channels/

Public, no auth. Active channels only.

{
  "channels": [
    { "slug": "compilation", "name": "Compilation", "description": "", "is_primary": true }
  ]
}

For the full list including inactive channels (plus id, is_active, sort_order), see GET /accounts/admin/channels/ under Admin: Channels on the Auth & Accounts page — admin-only.

GET /files/browse/ — Directory Listing

Param Required Description
path No Directory path relative to compilation root
search No Filter items by name (e.g. ".mp3")
channel No Comp channel slug — defaults to the primary channel

GET /files/list-all/ — Flat File List

Param Required Description
channel No Comp channel slug — defaults to the primary channel

GET /files/thumbnail/ — Thumbnail Image

Param Required Description
path Yes File path relative to compilation root
channel No Comp channel slug — defaults to the primary channel

GET /files/info/ — File Metadata

Param Required Description
path Yes File path relative to compilation root
channel No Comp channel slug — defaults to the primary channel

GET /files/cover-art/ — Cover Art Image

Param Required Description
path Yes Audio file path relative to compilation root
small No "true" — returns a degraded ~128px JPEG instead of the full-size embedded art
channel No Comp channel slug — defaults to the primary channel

The original is often a 600×600 PNG around 1 MB. small=true serves the same image downscaled to a few KB — use it for anything drawn at thumbnail size, and as a fast first paint before the full-size one loads.

GET /files/cover-art/?path=Compilation/…/Lucid Dreams.mp3&small=true

GET /files/art/ is an alias for this same endpoint, same params, same response.

GET /files/image-thumbnail/ — Resized Image Thumbnail

Param Required Description
path Yes Image file path relative to compilation root
size No Target size in px, 32-1024 (default 256)
channel No Comp channel slug — defaults to the primary channel

Returns a resized JPEG. An SVG source passes through unresized.

GET /files/download/ — Audio Stream

The primary audio streaming endpoint. Supports HTTP Range requests — the browser <audio> element handles seeking automatically when you set src.

Param Required Description
path Yes File path relative to compilation root
small No "true" — for an image path, returns a degraded/downscaled version instead of the original
channel No Comp channel slug — defaults to the primary channel

small=true only makes sense when path points at an image (e.g. a cover art file) — pass it to shrink a large cover for a thumbnail without fetching the full-size original. For audio, it has no effect.

GET /files/download/?path=Compilation/cover.jpg&small=true

Simple playback:

<audio
  controls
  src={`https://juicewrldapi.com/juicewrld/files/download/?path=${encodeURIComponent(song.path)}`}
/>

Manual Range request (for custom seeking):

fetch(
  `https://juicewrldapi.com/juicewrld/files/download/?path=${encodeURIComponent(path)}`,
  { headers: { Range: 'bytes=0-1048575' } }
)
// Returns 206 Partial Content with Content-Range header

Responses: 200 OK full file · 206 Partial Content range

GET /files/download-compressed/ — Compressed Audio

On-the-fly transcode to a lower bitrate MP3, for bandwidth-constrained playback.

Param Required Description
path Yes File path relative to compilation root
bitrate No Target bitrate, e.g. "160k" (default)
channel No Comp channel slug — defaults to the primary channel

Response is always served as an attachment, not inline.

ZIP Operations

POST /start-zip-job/

Start a background ZIP job. Returns a job_id for polling.

{ "paths": ["Compilation/song1.mp3", "Compilation/song2.mp3"], "channel": "sessions-comp" }

channel is optional — omit it for the primary channel.

GET /zip-job-status/{job_id}/

Poll ZIP job progress. Once status is "done", the response carries a download_url pointing at GET /zip-jobs/{filename}, which streams the finished archive (supports Range) and deletes it from disk once fully downloaded.

POST /cancel-zip-job/{job_id}/

Cancel an in-progress ZIP job.

POST /files/zip-selection/

Immediate ZIP stream (not background) — POST a list of relative paths, get a streaming zip of those files/folders from that channel's tree back directly (no job_id polling).

{ "paths": ["Compilation/Folder"], "channel": "sessions-comp" }

channel is optional — omit it for the primary channel.

Clone this wiki locally