Webserver and html file

how can I buffer a number of chars without full the ram?

The read() method has two forms:

  virtual int read();
  int read(void *buf, uint16_t nbyte);

The first, that you are using, returns one character (or an error). The second returns the number of characters stored in the buffer that is the first argument. The second argument is the size of the buffer.

char fileBuf[81];

int charCnt = file.read(fileBuf, 80);
fileBuf[charCnt] = '\0';
server.write(fileBuf, charCnt);