mqtt via mcutie

This commit is contained in:
2025-09-29 01:00:11 +02:00
parent 3d18b0dbf6
commit cfe23c8a09
15 changed files with 482 additions and 482 deletions

View File

@@ -48,7 +48,7 @@ where
Some(200)
}
Method::Get => {
let disp = format!("attachment; filename=\"{filename}\"");
let disposition = format!("attachment; filename=\"{filename}\"");
let size = {
let mut board = BOARD_ACCESS.get().await.lock().await;
board
@@ -63,7 +63,7 @@ where
Some("OK"),
&[
("Content-Type", "application/octet-stream"),
("Content-Disposition", disp.as_str()),
("Content-Disposition", disposition.as_str()),
("Content-Length", &format!("{}", size)),
("Access-Control-Allow-Origin", "*"),
("Access-Control-Allow-Headers", "*"),
@@ -75,7 +75,7 @@ where
let mut chunk = 0;
loop {
let mut board = BOARD_ACCESS.get().await.lock().await;
board.board_hal.progress(chunk as u32).await;
board.board_hal.progress(chunk).await;
let read_chunk = board
.board_hal
.get_esp()
@@ -107,7 +107,7 @@ where
Method::Post => {
{
let mut board = BOARD_ACCESS.get().await.lock().await;
//ensure file is deleted, otherwise we would need to truncate the file which will not work with streaming
//ensure the file is deleted first; otherwise we would need to truncate the file which will not work with streaming
let _ = board
.board_hal
.get_esp()