From 2453beb30f7e6b1792b2ac073deb84fd7b16b9af Mon Sep 17 00:00:00 2001 From: gemu2015 Date: Thu, 11 Jun 2020 06:43:24 +0200 Subject: [PATCH] scripter fix sdcard regression --- tasmota/xdrv_10_scripter.ino | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/tasmota/xdrv_10_scripter.ino b/tasmota/xdrv_10_scripter.ino index 5a79d50b5..4d0bc1588 100755 --- a/tasmota/xdrv_10_scripter.ino +++ b/tasmota/xdrv_10_scripter.ino @@ -3979,8 +3979,7 @@ void ListDir(char *path, uint8_t depth) { char path[48]; -void Script_FileUploadConfiguration(void) -{ +void Script_FileUploadConfiguration(void) { uint8_t depth=0; strcpy(path,"/"); @@ -3995,17 +3994,6 @@ void Script_FileUploadConfiguration(void) } } - void ScriptFileUploadSuccess(void) { - WSContentStart_P(S_INFORMATION); - WSContentSendStyle(); - WSContentSend_P(PSTR("
" D_UPLOAD " " D_SUCCESSFUL "
"), WebColor(COL_TEXT_SUCCESS)); - WSContentSend_P(PSTR("

")); - WSContentSend_P(PSTR("

"),"/upl",D_UPL_DONE); - //WSContentSpaceButton(BUTTON_MAIN); - WSContentStop(); - } - WSContentStart_P(S_SCRIPT_FILE_UPLOAD); WSContentSendStyle(); WSContentSend_P(HTTP_FORM_FILE_UPLOAD,D_SDCARD_DIR); @@ -4023,13 +4011,22 @@ void Script_FileUploadConfiguration(void) Web.upload_error = 0; } +void ScriptFileUploadSuccess(void) { + WSContentStart_P(S_INFORMATION); + WSContentSendStyle(); + WSContentSend_P(PSTR("
" D_UPLOAD " " D_SUCCESSFUL "
"), WebColor(COL_TEXT_SUCCESS)); + WSContentSend_P(PSTR("

")); + WSContentSend_P(PSTR("

"),"/upl",D_UPL_DONE); + //WSContentSpaceButton(BUTTON_MAIN); + WSContentStop(); +} + + File upload_file; - void script_upload(void) { - //AddLog_P(LOG_LEVEL_INFO, PSTR("HTP: file upload")); - HTTPUpload& upload = Webserver->upload(); if (upload.status == UPLOAD_FILE_START) { char npath[48];