Server URL import (NDJSON)

Server-side URL import with live NDJSON progress

Paste a remote URL; the server fetches it and streams the bytes through your IUploaderProvider. The client sees live progress events (started → progress → complete) as newline-delimited JSON from a streaming fetch() response — no polling, no WebSocket. Backward-compatible: older clients that don't send Accept: application/x-ndjson get a single JSON response.

Client API
// Queue a URL import — returns the queued UploadTask.
uploader.importFromUrl('https://example.com/sample.zip', {
    fileName: 'report.zip',         // optional
    contentType: 'application/zip'  // optional
});
NDJSON wire protocol

Client sends Accept: application/x-ndjson; server streams one JSON event per line:

{"type":"started","fileName":"sample.zip","totalBytes":12345678}
{"type":"progress","loaded":1048576,"total":12345678}
{"type":"progress","loaded":2097152,"total":12345678}
...
{"type":"complete","success":true,"fileGuid":"...","fileName":"sample.zip","fileSize":12345678}
Server-side fetch

The /import-url endpoint in AjaxUploaderHandler uses HttpWebRequest + ProgressReportingStream to emit throttled progress events during the server's fetch. Streams directly to the configured provider (filesystem by default).