Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Firmware/RTK_Everywhere/WebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ static void handleFirmwareFileUpload()
{
// Check file name against valid firmware names
const char *BIN_EXT = "bin";
const char *BIN_HEADER = "RTK_Everywhere_Firmware";
const char *BIN_HEADER = "/RTK_Everywhere";

fileName = upload.filename;

Expand All @@ -429,7 +429,7 @@ static void handleFirmwareFileUpload()
// Check 'bin' extension
if (strcmp(BIN_EXT, &fname[strlen(fname) - strlen(BIN_EXT)]) == 0)
{
// Check for 'RTK_Everywhere_Firmware' start of file name
// Check for '/RTK_Everywhere' start of file name
if (strncmp(fname, BIN_HEADER, strlen(BIN_HEADER)) == 0)
{
// Begin update process
Expand Down Expand Up @@ -465,6 +465,10 @@ static void handleFirmwareFileUpload()
}
else
{
// See issue #811
// The Update.write seems to upload the whole file in one go
// This code never gets called...

binBytesSent = upload.currentSize;

// Send an update to browser every 100k
Expand Down