firmware wip - make firmware file required on form

This commit is contained in:
Marcus 2024-06-16 00:08:03 +02:00
parent bacb48a918
commit 25bf84ee1e
3 changed files with 3 additions and 3 deletions

View file

@ -507,7 +507,7 @@ const char HTMLupdate[] PROGMEM = R"EOF(
<p>You find the latest CanGrow firmware version on the <a href='https://git.la10cy.net/DeltaLima/CanGrow/releases' target='_blank'>release page</a> of the git repository.</p> <p>You find the latest CanGrow firmware version on the <a href='https://git.la10cy.net/DeltaLima/CanGrow/releases' target='_blank'>release page</a> of the git repository.</p>
<form method='POST' action='/system/applyUpdate' enctype='multipart/form-data'> <form method='POST' action='/system/applyUpdate' enctype='multipart/form-data'>
<b>Select .bin file:</b><br> <b>Select .bin file:</b><br>
<input type='file' accept='.bin,.bin.gz' name='firmware'> <input type='file' accept='.bin,.bin.gz' name='firmware' required>
<input type='submit' value='Update Firmware' onclick="document.getElementById('divUploading').style.display = '';"> <input type='submit' value='Update Firmware' onclick="document.getElementById('divUploading').style.display = '';">
</form> </form>
<div id='divUploading' style='display: none;' class='warnmsg'>&#x1F6DC; Uploading, please wait...<div> <div id='divUploading' style='display: none;' class='warnmsg'>&#x1F6DC; Uploading, please wait...<div>

View file

@ -1,5 +1,5 @@
/* CanGrow_Version.h gets generated from cangrow.sh */ /* CanGrow_Version.h gets generated from cangrow.sh */
const char* CanGrowVer = "0.1-dev"; const char* CanGrowVer = "0.1-dev";
const char* CanGrowBuild = "52abf8e"; const char* CanGrowBuild = "bacb48a";

View file

@ -89,7 +89,7 @@ const char* CanGrowBuild = \"${BUILD}\";
;; ;;
w|webupload) w|webupload)
echo ":: Uploading to $IP" echo ":: Uploading to $IP"
curl -v http://$IP/system/applyUpdate -X POST -H 'Content-Type: multipart/form-data' -F "file=@$(pwd)/build/CanGrow.ino.bin" curl -v http://$IP/system/applyUpdate -X POST -H 'Content-Type: multipart/form-data' -F "firmware=@$(pwd)/build/CanGrow.ino.bin"
echo echo
;; ;;
m|mon|monitor) m|mon|monitor)