Revert GUI file accept

This commit is contained in:
Theo Arends 2022-11-24 14:47:26 +01:00
parent f0f1a85984
commit a381da3a39
3 changed files with 11 additions and 7 deletions

View File

@ -9,17 +9,20 @@ All notable changes to this project will be documented in this file.
- Optional define ``SERIAL_BRIDGE_BUFFER_SIZE`` to set Serial Bridge internal buffer size (Default ESP8266 = 256, ESP32 = 800)
- Command ``SSerialBuffer 256..SERIAL_BRIDGE_BUFFER_SIZE`` to change serial bridge rx buffer size (#17120)
- Command ``SetOption35 0..255`` to skip number of received messages in Serial Bridge (default 0) (#17140)
- Teleinfo TEMPO (BBR) contract (#17160)
### Breaking Changed
### Changed
- Serial Bridge default internal serial rx buffer size from 64 to 256 (#17120)
- Accept filename extensions to GUI file upload input fields (#16875)
- AC PWM dimmer lineair power distribution (#17177)
### Fixed
- ModbusBridge baudrates over 76500 baud (#17106)
### Removed
- Accept filename extensions to GUI file upload input fields as not functional in some browsers (#16875)
## [12.2.0.4] 20221117
### Added

View File

@ -127,6 +127,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
- Support for Dingtian x595 shift register based relay boards by Barbudor [#17032](https://github.com/arendst/Tasmota/issues/17032)
- Support for HMC5883L 3-Axis Digital Compass sensor by Andreas Achtzehn [#17069](https://github.com/arendst/Tasmota/issues/17069)
- WS2812 and Light ArtNet DMX control over UDP port 6454 [#17059](https://github.com/arendst/Tasmota/issues/17059)
- Teleinfo TEMPO (BBR) contract [#17160](https://github.com/arendst/Tasmota/issues/17160)
- Berry ``bytes().setbytes()`` method [#16892](https://github.com/arendst/Tasmota/issues/16892)
- Berry ``bytes().reverse()`` method [#16977](https://github.com/arendst/Tasmota/issues/16977)
- Zigbee router firmware for Sonoff ZBBridgePro [#16900](https://github.com/arendst/Tasmota/issues/16900)
@ -140,13 +141,13 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
- ESP32 Framework (Core) from v2.0.5 to v2.0.5.3
- ESP32 LVGL library from v8.3.2 to v8.3.3 (no functional change)
- ESP32 NimBLE library from v1.4.0 to v1.4.1 [#16775](https://github.com/arendst/Tasmota/issues/16775)
- Accept filename extensions to GUI file upload input fields [#16875](https://github.com/arendst/Tasmota/issues/16875)
- Serial Bridge default internal serial rx buffer size from 64 to 256 [#17120](https://github.com/arendst/Tasmota/issues/17120)
- DS18x20 ``DS18Alias`` to ``DS18Sens`` [#16833](https://github.com/arendst/Tasmota/issues/16833)
- Compiling with reduced boards manifests in favour of Autoconfig [#16848](https://github.com/arendst/Tasmota/issues/16848)
- ADE7953 monitoring from instant power to accumulated energy [#16941](https://github.com/arendst/Tasmota/issues/16941)
- TuyaMcu rewrite by btsimonh [#17051](https://github.com/arendst/Tasmota/issues/17051)
- WS2812 sends signal to only ``Pixels`` leds instead of sending to 512 leds [#17055](https://github.com/arendst/Tasmota/issues/17055)
- AC PWM dimmer lineair power distribution [#17177](https://github.com/arendst/Tasmota/issues/17177)
- Zigbee improved Aqara plug support and completed cluster 0x0702 [#17073](https://github.com/arendst/Tasmota/issues/17073)
### Fixed

View File

@ -354,7 +354,7 @@ const char HTTP_FORM_UPG[] PROGMEM =
"<fieldset><legend><b>&nbsp;" D_UPGRADE_BY_FILE_UPLOAD "&nbsp;</b></legend>";
const char HTTP_FORM_RST_UPG[] PROGMEM =
"<form method='post' action='u2?fsz=' enctype='multipart/form-data'>"
"<br><input type='file' name='u2' accept='%s'><br>"
"<br><input type='file' name='u2'><br>"
"<br><button type='submit' "
"onclick='eb(\"f1\").style.display=\"none\";eb(\"f2\").style.display=\"block\";this.form.action+=this.form[\"u2\"].files[0].size;this.form.submit();'"
">" D_START " %s</button></form>"
@ -365,7 +365,7 @@ const char HTTP_FORM_RST_UPG[] PROGMEM =
// upload via factory partition
const char HTTP_FORM_RST_UPG_FCT[] PROGMEM =
"<form method='post' action='u2?fsz=' enctype='multipart/form-data'>"
"<br><input type='file' name='u2' accept='%s'><br>"
"<br><input type='file' name='u2'><br>"
"<br><button type='submit' "
"onclick='eb(\"f1\").style.display=\"none\";eb(\"f3\").style.display=\"block\";this.form.action+=this.form[\"u2\"].files[0].size;return upl(this);'"
">" D_START " %s</button></form>"
@ -2296,7 +2296,7 @@ void HandleRestoreConfiguration(void)
WSContentStart_P(PSTR(D_RESTORE_CONFIGURATION));
WSContentSendStyle();
WSContentSend_P(HTTP_FORM_RST);
WSContentSend_P(HTTP_FORM_RST_UPG, PSTR(".dmp"), PSTR(D_RESTORE));
WSContentSend_P(HTTP_FORM_RST_UPG, PSTR(D_RESTORE));
if (WifiIsInManagerMode()) {
WSContentSpaceButton(BUTTON_MAIN);
} else {
@ -2566,12 +2566,12 @@ void HandleUpgradeFirmware(void) {
WSContentSend_P(HTTP_FORM_UPG, SettingsText(SET_OTAURL));
#ifdef ESP32
if (EspSingleOtaPartition() && !EspRunningFactoryPartition()) {
WSContentSend_P(HTTP_FORM_RST_UPG_FCT, PSTR(".bin,.ota,.hex"), PSTR(D_UPGRADE));
WSContentSend_P(HTTP_FORM_RST_UPG_FCT, PSTR(D_UPGRADE));
} else {
WSContentSend_P(HTTP_FORM_RST_UPG, PSTR(".bin"), PSTR(D_UPGRADE));
WSContentSend_P(HTTP_FORM_RST_UPG, PSTR(D_UPGRADE));
}
#else
WSContentSend_P(HTTP_FORM_RST_UPG, PSTR(".bin,.bin.gz,.ota,.hex"), PSTR(D_UPGRADE));
WSContentSend_P(HTTP_FORM_RST_UPG, PSTR(D_UPGRADE));
#endif
WSContentSpaceButton(BUTTON_MAIN);
WSContentStop();