Re-downloads the file content from its original source_url, replaces the file on disk,
and re-runs the RAG ingestion pipeline — regenerating embeddings, summary, and metadata.
The existing Upload record is updated in-place (no new record is created).
Only works for files that were originally uploaded via URL (source_url must be set).
Collection membership is preserved through the re-ingestion process.
YouTube URLs are automatically detected and handled specially: metadata is fetched via
oEmbed, transcripts are extracted with timestamps, and the upload thumbnail and embed_url
are updated. If no captions are available and skipIndexing is false, the request fails.
On failure, the upload’s original status is restored to prevent file cards from getting stuck in a “processing” state.
JWT token passed in x-access-token header
The file ID to re-ingest
When true, re-downloads the content but skips RAG embedding generation. The file is set to status 'active' with no new embeddings. For YouTube URLs without captions, this allows creating a metadata-only file instead of failing.