0

I would like to read a file line by line on a webpage, and the files can be huge.

The file is not on a server but on the client side. I access it with an input-file object.

I know that I could read all the file first, and then split it like on this post but the issue is that my textfile can really be huge (potentially hundreds of megabytes): I don’t want to fill the RAM.

So is there a way to read a portion of the file, not all the content at once?

rambi
  • 1,013
  • 1
  • 7
  • 25
  • 1
    Seems to be possible, but never tried: https://stackoverflow.com/a/28318964/5781499 – Marc Nov 25 '20 at 15:39
  • Thanks, the slice-way works really well! Maybe I should me marked as a duplicate of this question … – rambi Nov 25 '20 at 18:17

0 Answers0