This commit is contained in:
Tester23
2024-04-10 15:48:36 +02:00
16 changed files with 247 additions and 42 deletions

View File

@ -928,7 +928,7 @@ typedef enum {
int http_fn_about(http_request_t* request) {
http_setup(request, httpMimeTypeHTML);
http_html_start(request, "About");
poststr_h2(request, "Open source firmware for BK7231N, BK7231T, XR809 and BL602 by OpenSHWProjects");
poststr_h2(request, "Open source firmware for BK7231N, BK7231T, T34, BL2028N, XR809, W600/W601, W800/W801, BL602, LF686 and LN882H by OpenSHWProjects");
poststr(request, htmlFooterReturnToMainPage);
http_html_end(request);
poststr(request, NULL);

View File

@ -534,6 +534,14 @@ static int http_rest_post_lfs_file(http_request_t* request) {
// create if it does not exist
init_lfs(1);
if (!lfs_present()) {
request->responseCode = 400;
http_setup(request, httpMimeTypeText);
poststr(request, "LittleFS is not abailable");
poststr(request, NULL);
return 0;
}
fpath = os_malloc(strlen(request->url) - strlen("api/lfs/") + 1);
file = os_malloc(sizeof(lfs_file_t));
memset(file, 0, sizeof(lfs_file_t));