title: Arduino ESP8266 download big files from webserver
body: <p>I'm trying to read a big file on SD card and send it to client that's connected to web server. For server I'm using ESP8266WebServer.h</p>
  
  <p>So far the only option that worked for me is this:</p>
  
  <pre><code>httpServer.sendHeader("Content-Type", "text/text");
  httpServer.sendHeader("Content-Disposition", "attachment; filename=\"download.txt\"");
  httpServer.sendHeader("Connection", "close");
  File download = SD.open("test.txt");
  String buffer = download.readString();
  httpServer.send(200, "text/text", buffer);
  download.close();
  </code></pre>
  
  <p>This isn't usable for me because the file would not fit into the stack. Is there a way to continuously send data to client? I've tried httpServer.sendContent(), but the sent data only shows as a webpage content and send() closes connection after the first data send.</p>
  
  <p>EDIT:</p>
  
  <p>Solution found in examples</p>
  
  <pre><code>httpServer.streamFile(download, "application/octet-stream");
  </code></pre>