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:
Dave Allie
2025-12-21 15:43:17 +11:00
committed by GitHub
parent 926c786705
commit 9b4dfbd180
2 changed files with 39 additions and 64 deletions

View File

@@ -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 += "/";