psi-4ward / psitransfer

Simple open source self-hosted file sharing solution.
BSD 2-Clause "Simplified" License
1.48k stars 216 forks source link

downloading larger tar.gz fails (while .zip works) #181

Closed lpirl closed 2 years ago

lpirl commented 3 years ago

First, thanks for this really neat piece of software. Appreciate much. :)

When trying to download a larger .tar.gz file (> 3 GB, a handful of files), the app crashes and the following error is logged:

2021-06-28T12:18:07.309Z GET /file-transfer/files/aa693c499468++79d75e1dc187fdb3add6c1b081af9527.zip 200 12.917 10.1.1.23
buffer.js:268
    throw err;
    ^
RangeError [ERR_INVALID_OPT_VALUE]: The value "3494902472" is invalid for option "size"
    at Function.alloc (buffer.js:277:3)
    at new Buffer (buffer.js:179:19)
    at ReadStream.<anonymous> (/home/file-transfer/psitransfer/node_modules/archiver-utils/index.js:39:15)
    at ReadStream.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! psitransfer@0.0.0 start: `NODE_ENV=production node app.js`
npm ERR! Exit status 1
psi-4ward commented 2 years ago

should be fixed in 6984d81bbb166180bdafeddf9e6fc25729cef37b

sry for the delay :\