Allow any file to be uploaded (#84)
## Summary - Allow any file to be uploaded - Removes .epub restriction ## Additional Context - Fixes #74
This commit is contained in:
@@ -513,13 +513,6 @@ void CrossPointWebServer::handleUpload() {
|
||||
Serial.printf("[%lu] [WEB] [UPLOAD] START: %s to path: %s\n", millis(), uploadFileName.c_str(), uploadPath.c_str());
|
||||
Serial.printf("[%lu] [WEB] [UPLOAD] Free heap: %d bytes\n", millis(), ESP.getFreeHeap());
|
||||
|
||||
// Validate file extension
|
||||
if (!isEpubFile(uploadFileName)) {
|
||||
uploadError = "Only .epub files are allowed";
|
||||
Serial.printf("[%lu] [WEB] [UPLOAD] REJECTED - not an epub file\n", millis());
|
||||
return;
|
||||
}
|
||||
|
||||
// Create file path
|
||||
String filePath = uploadPath;
|
||||
if (!filePath.endsWith("/")) filePath += "/";
|
||||
|
||||
Reference in New Issue
Block a user