Skip to content
This repository was archived by the owner on Jan 31, 2024. It is now read-only.

Commit 9a07705

Browse files
authored
v1.7.0 to fix file upload
### Releases v1.7.0 1. Fix file upload to Teensy 4.1 board based on suggestions made on the PJRC forum. Align signatures of file upload handlers. For more details, please see this post: [AsyncWebServer_Teensy41 bug onUpload](https://forum.pjrc.com/index.php?threads/asyncwebserver_teensy41-bug-onupload.72220).
1 parent f508f2f commit 9a07705

24 files changed

+67
-44
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Please ensure to specify the following:
1818

1919
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
2020
* `Teensyduino` Core Version (e.g. `Teensyduino core v1.57`)
21-
* `QNEthernet` library version (e.g. `QNEthernet v0.17.0`)
21+
* `QNEthernet` library version (e.g. `QNEthernet v0.26.0`)
2222
* Board type and relevant info
2323
* Contextual information (e.g. what you were trying to achieve)
2424
* Simplest possible steps to reproduce
@@ -35,9 +35,9 @@ Please be educated, civilized and constructive as you've always been. Disrespect
3535
```
3636
Arduino IDE version: 1.8.19
3737
Teensyduino core v1.57
38-
Teensy 4.1 using QNEthernet v0.17.0
38+
Teensy 4.1 using QNEthernet v0.26.0
3939
OS: Ubuntu 20.04 LTS
40-
Linux xy-Inspiron-3593 5.15.0-58-generic #64~20.04.1-Ubuntu SMP Fri Jan 6 16:42:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
40+
Linux xy-Inspiron-3593 5.15.0-92-generic #102~20.04.1-Ubuntu SMP Mon Jan 15 13:09:14 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
4141
4242
Context:
4343
I encountered a crash while using this library

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ to apply the better and faster **asynchronous** feature of the **powerful** [ESP
236236

237237
1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest)
238238
2. [`Teensy core v1.57+`](https://github.com/PaulStoffregen/cores) for Teensy 4.1. [![GitHub release](https://img.shields.io/github/release/PaulStoffregen/cores.svg)](https://github.com/PaulStoffregen/cores/releases/latest)
239-
3. [`QNEthernet Library version v0.17.0+`](https://github.com/ssilverman/QNEthernet) for Teensy 4.1 built-in Ethernet
239+
3. [`QNEthernet Library version v0.26.0+`](https://github.com/ssilverman/QNEthernet) for Teensy 4.1 built-in Ethernet
240240
4. [`Teensy41_AsyncTCP library v1.1.0+`](https://github.com/khoih-prog/Teensy41_AsyncTCP) to use **Teensy 4.1 using QNEthernet Library**. [![GitHub release](https://img.shields.io/github/release/khoih-prog/Teensy41_AsyncTCP.svg)](https://github.com/khoih-prog/Teensy41_AsyncTCP/releases/latest)
241241

242242
---
@@ -1404,7 +1404,7 @@ Following are debug terminal output and screen shots when running example [Async
14041404

14051405
```cpp
14061406
Start Async_AdvancedWebServer on TEENSY 4.1 with Teensy4.1 QNEthernet
1407-
AsyncWebServer_Teensy41 v1.6.2
1407+
AsyncWebServer_Teensy41 v1.7.0
14081408
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.107
14091409
HTTP EthernetWebServer is @ IP : 192.168.2.107
14101410
```
@@ -1422,7 +1422,7 @@ Following is debug terminal output when running example [WebClient](examples/Web
14221422

14231423
```cpp
14241424
Start WebClient on TEENSY 4.1 with Teensy4.1 QNEthernet
1425-
AsyncWebServer_Teensy41 v1.6.2
1425+
AsyncWebServer_Teensy41 v1.7.0
14261426
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.107
14271427

14281428
Starting connection to server...
@@ -1493,7 +1493,7 @@ Following is debug terminal output when running example [MQTTClient_Auth](exampl
14931493

14941494
```cpp
14951495
Start MQTTClient_Auth on TEENSY 4.1 with Teensy4.1 QNEthernet
1496-
AsyncWebServer_Teensy41 v1.6.2
1496+
AsyncWebServer_Teensy41 v1.7.0
14971497
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.107
14981498
Attempting MQTT connection to broker.emqx.io...connected
14991499
Message Send : MQTT_Pub => Hello from MQTTClient_Auth on TEENSY 4.1 with Teensy4.1 QNEthernet
@@ -1513,7 +1513,7 @@ Following is debug terminal output when running example [MQTTClient_Basic](examp
15131513

15141514
```cpp
15151515
Start MQTTClient_Basic on TEENSY 4.1 with Teensy4.1 QNEthernet
1516-
AsyncWebServer_Teensy41 v1.6.2
1516+
AsyncWebServer_Teensy41 v1.7.0
15171517
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.107
15181518
Attempting MQTT connection to broker.emqx.io...connected
15191519
Message Send : MQTT_Pub => Hello from MQTTClient_Basic on TEENSY 4.1 with Teensy4.1 QNEthernet
@@ -1540,7 +1540,7 @@ Following is debug terminal output when running example [MQTT_ThingStream](examp
15401540

15411541
```cpp
15421542
Start MQTT_ThingStream on TEENSY 4.1 with Teensy4.1 QNEthernet
1543-
AsyncWebServer_Teensy41 v1.6.2
1543+
AsyncWebServer_Teensy41 v1.7.0
15441544
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.107
15451545
***************************************
15461546
Teensy41_Pub
@@ -1573,7 +1573,7 @@ Following is the debug terminal and screen shot when running example [Async_Adva
15731573

15741574
```cpp
15751575
Start Async_AdvancedWebServer_MemoryIssues_Send_CString on TEENSY 4.1 with Teensy4.1 QNEthernet
1576-
AsyncWebServer_Teensy41 v1.6.2
1576+
AsyncWebServer_Teensy41 v1.7.0
15771577

15781578
HEAP DATA - Start => Free heap: 483328 Used heap: 0
15791579
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.83
@@ -1597,7 +1597,7 @@ While using `Arduino String`, the HEAP usage is very large
15971597

15981598
```cpp
15991599
Start Async_AdvancedWebServer_MemoryIssues_SendArduinoString on TEENSY 4.1 with Teensy4.1 QNEthernet
1600-
AsyncWebServer_Teensy41 v1.6.2
1600+
AsyncWebServer_Teensy41 v1.7.0
16011601

16021602
HEAP DATA - Start => Free heap: 483328 Used heap: 0
16031603
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.83
@@ -1637,7 +1637,7 @@ Following is debug terminal output when running example [Async_AdvancedWebServer
16371637

16381638
```cpp
16391639
Start Async_AdvancedWebServer_SendChunked on TEENSY 4.1 with Teensy4.1 QNEthernet
1640-
AsyncWebServer_Teensy41 v1.6.2
1640+
AsyncWebServer_Teensy41 v1.7.0
16411641
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.92
16421642
AsyncWebServer is @ IP : 192.168.2.92
16431643
.[AWS] Total length to send in chunks = 31235
@@ -1706,7 +1706,7 @@ Following is debug terminal output when running example [AsyncWebServer_SendChun
17061706

17071707
```cpp
17081708
Start AsyncWebServer_SendChunked on TEENSY 4.1 with Teensy4.1 QNEthernet
1709-
AsyncWebServer_Teensy41 v1.6.2
1709+
AsyncWebServer_Teensy41 v1.7.0
17101710
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.92
17111711
AsyncWebServer is @ IP : 192.168.2.92
17121712
.[AWS] Total length to send in chunks = 46302
@@ -1762,7 +1762,7 @@ Following is debug terminal output when running example [Async_WebSocketsServer]
17621762

17631763
```cpp
17641764
Starting Async_WebSocketsServer on TEENSY 4.1 with Teensy4.1 QNEthernet
1765-
AsyncWebServer_Teensy41 v1.6.2
1765+
AsyncWebServer_Teensy41 v1.7.0
17661766
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.119
17671767
ws[Server: /ws][ClientID: 1] WSClient connected
17681768
ws[Server: /ws][ClientID: 1] text-message[len: 13]: Hello, Server
@@ -1828,7 +1828,7 @@ Submit issues to: [AsyncWebServer_Teensy41 issues](https://github.com/khoih-prog
18281828
9. Add examples [Async_AdvancedWebServer_SendChunked](https://github.com/khoih-prog/AsyncWebServer_RP2040W/tree/main/examples/Async_AdvancedWebServer_SendChunked) and [AsyncWebServer_SendChunked](https://github.com/khoih-prog/AsyncWebServer_RP2040W/tree/main/examples/AsyncWebServer_SendChunked) to demo how to use `beginChunkedResponse()` to send large `html` in chunks
18291829
10. Use `allman astyle` and add `utils`
18301830
11. Add examples [Async_WebSocketsServer](https://github.com/khoih-prog/AsyncWebServer_Teensy41/tree/main/examples/Async_WebSocketsServer) to demo how to use `Async_WebSockets`
1831-
1831+
12. Fix `onUpload bug`. Check [AsyncWebServer_Teensy41 bug onUpload](https://forum.pjrc.com/index.php?threads/asyncwebserver_teensy41-bug-onupload.72220/)
18321832

18331833
---
18341834
---
@@ -1840,11 +1840,13 @@ Submit issues to: [AsyncWebServer_Teensy41 issues](https://github.com/khoih-prog
18401840
2. Thanks to [salasidis](https://github.com/salasidis) aka [rs77can](https://forum.arduino.cc/u/rs77can) to discuss and make the following `marvellous` PRs in [Portenta_H7_AsyncWebServer library](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer)
18411841
- [request->send(200, textPlainStr, jsonChartDataCharStr); - Without using String Class - to save heap #8](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/pull/8), leading to `v1.6.0` to support using `CString` to save heap to send `very large data`
18421842
- [All memmove() removed - string no longer destroyed #11](https://github.com/khoih-prog/Portenta_H7_AsyncWebServer/pull/11), leading to `v1.6.0` to remove `memmove()` and not to destroy String anymore
1843+
3. Thanks to [E. van Putten](https://github.com/edwinvp) / [Shuptuu](https://forum.pjrc.com/index.php?members/shuptuu.48798/) to make the following PR in [Fix file upload handler by adjusting function signatures #9](https://github.com/khoih-prog/AsyncWebServer_Teensy41/pull/9) leading to `v1.7.0`
18431844

18441845
<table>
18451846
<tr>
18461847
<td align="center"><a href="https://github.com/me-no-dev"><img src="https://github.com/me-no-dev.png" width="100px;" alt="me-no-dev"/><br /><sub><b>⭐️⭐️ Hristo Gochkov</b></sub></a><br /></td>
18471848
<td align="center"><a href="https://github.com/salasidis"><img src="https://github.com/salasidis.png" width="100px;" alt="salasidis"/><br /><sub><b>⭐️ salasidis</b></sub></a><br /></td>
1849+
<td align="center"><a href="https://github.com/edwinvp"><img src="https://github.com/edwinvp.png" width="100px;" alt="edwinvp"/><br /><sub><b>E. van Putten</b></sub></a><br /></td>
18481850
</tr>
18491851
</table>
18501852

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
* [Table of contents](#table-of-contents)
1919
* [Changelog](#changelog)
20+
* [Releases v1.7.0](#releases-v170)
2021
* [Releases v1.6.2](#releases-v162)
2122
* [Releases v1.6.1](#releases-v161)
2223
* [Releases v1.6.0](#releases-v160)

library.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"AsyncWebServer_Teensy41",
3-
"version": "1.6.2",
3+
"version": "1.7.0",
44
"description":"Asynchronous HTTP and WebSocket Server Library for Teensy 4.1 using QNEthernet. This library is one of the current or future Async libraries to support Teensy 4.1 using QNEthernet, such as AsyncHTTPRequest_Generic, AsyncHTTPSRequest_Generic, AsyncMQTT_Generic, Teensy41_AsyncWebServer, Teensy41_AsyncUDP, Teensy41_AsyncDNSServer, AsyncWebServer_Teensy41_SSL, etc. Now supporting using CString to save heap to send very large data and examples to demo how to use beginChunkedResponse() to send large html in chunks",
55
"keywords":"async, tcp, http, websocket, webserver, async-tcp, async-http, async-webserver, async-websocket, teensy, teensy41, teensy-41, qnethernet, lwip",
66
"authors":
@@ -32,7 +32,7 @@
3232
{
3333
"owner": "ssilverman",
3434
"name": "QNEthernet",
35-
"version": ">=0.17.0",
35+
"version": ">=0.26.0",
3636
"platforms": ["teensy"]
3737
}
3838
],

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=AsyncWebServer_Teensy41
2-
version=1.6.2
2+
version=1.7.0
33
author=Hristo Gochkov, Khoi Hoang
44
maintainer=Khoi Hoang <[email protected]>
55
sentence=Asynchronous HTTP and WebSocket Server Library for Teensy 4.1 using QNEthernet

platformio/platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ lib_deps =
4141
;
4242
; PlatformIO 5.x
4343
khoih-prog/Teensy41_AsyncTCP@>=1.1.0
44-
ssilverman/QNEthernet@>=0.17.0
44+
ssilverman/QNEthernet@>=0.26.0
4545

4646
; ============================================================
4747
build_flags =

src/AsyncEventSource_Teensy41.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
You should have received a copy of the GNU General Public License along with this program.
1818
If not, see <https://www.gnu.org/licenses/>.
1919
20-
Version: 1.6.2
20+
Version: 1.7.0
2121
2222
Version Modified By Date Comments
2323
------- ----------- ---------- -----------
@@ -27,6 +27,7 @@
2727
1.6.0 K Hoang 06/10/2022 Option to use non-destroyed cString instead of String to save Heap
2828
1.6.1 K Hoang 10/11/2022 Add examples to demo how to use beginChunkedResponse() to send in chunks
2929
1.6.2 K Hoang 16/01/2023 Add examples Async_WebSocketsServer
30+
1.7.0 K Hoang 29/01/2024 Fix file upload handler by adjusting function signatures
3031
*****************************************************************************************************************************/
3132

3233
#if !defined(_AWS_TEENSY41_LOGLEVEL_)

src/AsyncEventSource_Teensy41.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
You should have received a copy of the GNU General Public License along with this program.
1818
If not, see <https://www.gnu.org/licenses/>.
1919
20-
Version: 1.6.2
20+
Version: 1.7.0
2121
2222
Version Modified By Date Comments
2323
------- ----------- ---------- -----------
@@ -27,6 +27,7 @@
2727
1.6.0 K Hoang 06/10/2022 Option to use non-destroyed cString instead of String to save Heap
2828
1.6.1 K Hoang 10/11/2022 Add examples to demo how to use beginChunkedResponse() to send in chunks
2929
1.6.2 K Hoang 16/01/2023 Add examples Async_WebSocketsServer
30+
1.7.0 K Hoang 29/01/2024 Fix file upload handler by adjusting function signatures
3031
*****************************************************************************************************************************/
3132

3233
#pragma once

src/AsyncJson_Teensy41.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
You should have received a copy of the GNU General Public License along with this program.
1818
If not, see <https://www.gnu.org/licenses/>.
1919
20-
Version: 1.6.2
20+
Version: 1.7.0
2121
2222
Version Modified By Date Comments
2323
------- ----------- ---------- -----------
@@ -27,6 +27,7 @@
2727
1.6.0 K Hoang 06/10/2022 Option to use non-destroyed cString instead of String to save Heap
2828
1.6.1 K Hoang 10/11/2022 Add examples to demo how to use beginChunkedResponse() to send in chunks
2929
1.6.2 K Hoang 16/01/2023 Add examples Async_WebSocketsServer
30+
1.7.0 K Hoang 29/01/2024 Fix file upload handler by adjusting function signatures
3031
*****************************************************************************************************************************/
3132
/*
3233
Async Response to use with ArduinoJson and AsyncWebServer

src/AsyncWebAuthentication_Teensy41.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
You should have received a copy of the GNU General Public License along with this program.
1818
If not, see <https://www.gnu.org/licenses/>.
1919
20-
Version: 1.6.2
20+
Version: 1.7.0
2121
2222
Version Modified By Date Comments
2323
------- ----------- ---------- -----------
@@ -27,6 +27,7 @@
2727
1.6.0 K Hoang 06/10/2022 Option to use non-destroyed cString instead of String to save Heap
2828
1.6.1 K Hoang 10/11/2022 Add examples to demo how to use beginChunkedResponse() to send in chunks
2929
1.6.2 K Hoang 16/01/2023 Add examples Async_WebSocketsServer
30+
1.7.0 K Hoang 29/01/2024 Fix file upload handler by adjusting function signatures
3031
*****************************************************************************************************************************/
3132

3233
#if !defined(_AWS_TEENSY41_LOGLEVEL_)

0 commit comments

Comments
 (0)