When Axios resolves a Node request with responseType: 'stream', the body is ready to consume. The file is not yet complete. Await the transfer into its destination:

import { createWriteStream } from 'node:fs';
import { pipeline } from 'node:stream/promises';

const response = await client.get(url, { responseType: 'stream' });
await pipeline(response.data, createWriteStream(partPath));

This uses an already configured client. Its adapter must support the chosen proxy or SOCKS agent; Axios's built-in HTTP proxy option and a SOCKS agent are separate mechanisms. The application supplies the URL, timeouts and cancellation policy.

Use a temporary path owned by this operation. Choose how to handle collisions before creating the write stream, so failure cleanup cannot remove somebody else's file. An intentional resume needs its own policy.

pipeline coordinates reading and writing and reports their failure. Calling response.data.pipe(file) and immediately logging success skips that completion point. A network interruption or full disk can occur after a valid HTTP response has arrived; keep the response context and the error that stopped the pipeline.

After the awaited pipeline succeeds, perform the application's artifact checks and then publish the final name. Completion means the stream was consumed and written under these APIs, not that it is the expected release or document. On failure or cancellation, retain or remove the partial file according to the chosen resume policy. A cancellation signal can stop the relevant request and stream operations; it does not decide what the application should do with the output.

Artihkkalat mat laktásit