Add some sanity check due to webUI

This commit is contained in:
Luc 2021-01-07 20:42:03 +01:00
parent 0ceec99c01
commit d83faee956
3 changed files with 8 additions and 2 deletions

View File

@ -22,7 +22,7 @@
#define _VERSION_ESP3D_H
//version and sources location
#define FW_VERSION "3.0.0.a80"
#define FW_VERSION "3.0.0.a81"
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
#endif //_VERSION_ESP3D_H

View File

@ -49,6 +49,12 @@ void HTTP_Server::MKSFileupload ()
size_t fileSize = 0 ;
String filename = upload.filename;
String sfilename = "s"+filename;
//No / in filename
int p = filename.lastIndexOf("/");
if(p!=-1) {
filename.remove(0,p+1);
}
if (_webserver->hasArg(sfilename)) {
fileSize = _webserver->arg(sfilename).toInt();
} else if (_webserver->hasHeader("Content-Length")) {

View File

@ -408,7 +408,7 @@ void MKSService::messageWiFiControl(const uint8_t * dataFrame, const size_t data
log_esp3d("WiFi control flag not supported");
}
}
//Exception handle - but actually not used
//Exception handle - but actually not used
void MKSService::messageException(const uint8_t * dataFrame, const size_t dataSize )
{
if(dataSize != 1) {