fix(clouddrop): route chunk PUTs via upload.clouddrop.cc (bypass CF)

Only the 16 MB chunk stream needs the upload subdomain; init and
complete are tiny and can stay on the main host.
This commit is contained in:
Administrator 2026-04-11 15:09:13 +02:00
parent 0bf3061852
commit 6780cf3261

View File

@ -5,6 +5,7 @@ const { request, Agent } = require('undici');
const BASE_URL = 'https://clouddrop.cc';
const API_BASE = `${BASE_URL}/api/cloud`;
const CHUNK_UPLOAD_BASE = 'https://upload.clouddrop.cc/api/cloud';
const USER_AGENT = 'multi-hoster-uploader/1.0';
const SIMPLE_UPLOAD_LIMIT = 16 * 1024 * 1024; // 16 MB
@ -169,7 +170,7 @@ class ClouddropUploader {
if (throttle) await throttle.consume(thisChunkSize, signal);
const chunkRes = await request(`${API_BASE}/upload/${sessionId}/chunk/${i}`, {
const chunkRes = await request(`${CHUNK_UPLOAD_BASE}/upload/${sessionId}/chunk/${i}`, {
method: 'PUT',
dispatcher: clouddropAgent,
signal,