node-sharex-server icon indicating copy to clipboard operation
node-sharex-server copied to clipboard

Error if file is >2,14GB

Open Jan2220 opened this issue 4 years ago • 3 comments

Server prints error if the uploaded file gets requested is bigger than 2147483647 bytes.

RangeError [ERR_FS_FILE_TOO_LARGE]: File size (3022979744) is greater than possible Buffer: 2147483647 bytes
    at FSReqWrap.readFileAfterStat [as oncomplete] (fs.js:264:11)

The file could not be downloaded.

Jan2220 avatar Jul 31 '21 21:07 Jan2220

Hey, this happens because this is the maximum buffer size in node. Does it happen on the download or on the upload of a file of this size?

ravi0lii avatar Jul 31 '21 21:07 ravi0lii

it happens when i try downloading the file. (opening the url)

Jan2220 avatar Jul 31 '21 22:07 Jan2220

I think the appropriate solution would be to switch to a stream-based option for the download.
I'm currently working on a lot of stuff at the same time, so I will not be able to resolve this in the near future. If you want, you can make a PR or you can also use a webserver (like nginx) to serve the static files which should work, too.

ravi0lii avatar Aug 04 '21 10:08 ravi0lii