forked from me-no-dev/ESPAsyncWebServer
add ability to send File objects directly
utilize request's tempFile to store a handle to the file to send use open instead of exists in static handler
This commit is contained in:
@@ -48,6 +48,7 @@ class AsyncFileResponse: public AsyncAbstractResponse {
|
||||
void _setContentType(String path);
|
||||
public:
|
||||
AsyncFileResponse(FS &fs, String path, String contentType=String(), bool download=false);
|
||||
AsyncFileResponse(File content, String contentType=String(), bool download=false);
|
||||
~AsyncFileResponse();
|
||||
bool _sourceValid(){ return !!(_content); }
|
||||
size_t _fillBuffer(uint8_t *buf, size_t maxLen);
|
||||
|
||||
Reference in New Issue
Block a user