Chat freely about anything...
User avatar
By btidey
#73122 I normally include a basic hhtp upload in the sketch firmware which allows uploading a single file at a time from a simple web page. One can include the ftp library if one wants but that was overkill for most of my needs.

Something like
Code: Select allvoid handleMinimalUpload() {
  char temp[1500];

  snprintf ( temp, 1500,
    "<!DOCTYPE html>\
    <html>\
      <head>\
        <title>ESP8266 Upload</title>\
        <meta charset=\"utf-8\">\
        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\
        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\
      </head>\
      <body>\
        <form action=\"/edit\" method=\"post\" enctype=\"multipart/form-data\">\
          <input type=\"file\" name=\"data\">\
          <input type=\"text\" name=\"path\" value=\"/\">\
          <button>Upload</button>\
         </form>\
      </body>\
    </html>"
  );
  server.send ( 200, "text/html", temp );
}


with a
Code: Select all  server.on("/upload", handleMinimalUpload);

in setup