1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Merge branch 'ficeto-esp8266' into esp8266

* ficeto-esp8266:
  add template methods for stream to stream writes to SD and FS
  alignment not needed. we use fixed addresses
  Rework SPIFFS API to be more Arduino like
  fix missed edits
  disable automount
  fix SPIFFS to work
  pull get/set NoDelay for WiFiClient
  Add SPIFFS Support
  export sketch data folder to the build config
  Revert "Revert "Edit SD Server example to use the new Write(Stream) method""
  add template client write
  Revert "Add WiFiClient.write for Stream"
  Revert "Edit SD Server example to use the new Write(Stream) method"
  Edit SD Server example to use the new Write(Stream) method
  Add WiFiClient.write for Stream
  make upload callback packets aligned to defined size

Conflicts:
	hardware/esp8266com/esp8266/libraries/ESP8266WebServer/examples/SDWebServer/SDWebServer.ino
	hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp
	hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h
This commit is contained in:
Ivan Grokhotkov
2015-05-14 14:38:22 +03:00
27 changed files with 7380 additions and 84 deletions

View File

@ -29,23 +29,22 @@
enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE };
enum HTTPUploadStatus { UPLOAD_FILE_START, UPLOAD_FILE_WRITE, UPLOAD_FILE_END };
#define PAYLOAD_UNIT_SIZE 1460
#define HTTP_DOWNLOAD_UNIT_SIZE 1460
#define HTTP_UPLOAD_BUFLEN 2048
typedef struct {
HTTPUploadStatus status;
String filename;
String name;
String type;
size_t totalSize; // file size
size_t currentSize; // size of data currently in buf
uint8_t buf[PAYLOAD_UNIT_SIZE];
String filename;
String name;
String type;
size_t totalSize; // file size
size_t currentSize; // size of data currently in buf
uint8_t buf[HTTP_UPLOAD_BUFLEN];
} HTTPUpload;
class ESP8266WebServer
{
public:
ESP8266WebServer(int port = 80);
~ESP8266WebServer();
@ -83,6 +82,7 @@ protected:
void _parseArguments(String data);
static const char* _responseCodeToString(int code);
void _parseForm(WiFiClient& client, String boundary, uint32_t len);
void _uploadWriteByte(uint8_t b);
struct RequestHandler;
struct RequestArgument {