When using a stream the response attempts to check the size. For files larger than 4GB this creates an error.
RangeError: Invalid string length
at Array.join (<anonymous>)
at PassThrough.stream.getBufferedValue (/root/servers/file-queue-server/node_modules/download/node_modules/get-stream/buffer-stream.)
at /root/servers/file-queue-server/node_modules/download/node_modules/get-stream/index.js:44:23
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
Is this a limitation of the download library? The download file still downloads but the error is always thrown at > 99% of the download. Is there a config option to disable this buffer size check?
The file can download. Tested with files ranging from 50mb >= 100GB the error will always occur for files >4GB due to it attempting to compute a buffer larger than the maximum safe memory.
When using a stream the response attempts to check the size. For files larger than 4GB this creates an error.
Is this a limitation of the download library? The download file still downloads but the error is always thrown at > 99% of the download. Is there a config option to disable this buffer size check?
Sample of how I'm downloading a file.
The file can download. Tested with files ranging from 50mb >= 100GB the error will always occur for files >4GB due to it attempting to compute a buffer larger than the maximum safe memory.