1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-15 23:13:07 +01:00

upload/download buildconfig

This commit is contained in:
andreas
2023-10-01 12:40:16 +02:00
parent 728b4a4347
commit a334f886f6
5 changed files with 68 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
import {XtermOutputHandler} from "./installUtil.js";
import ESPInstaller from "./installUtil.js";
import { addEl, getParam, setValue, setVisible } from "./helper.js";
import { readFile, addEl, getParam, setValue, setVisible } from "./helper.js";
import * as zip from "https://cdn.jsdelivr.net/npm/@zip.js/zip.js@2.7.29/+esm";
(function(){
@@ -81,16 +81,7 @@ import * as zip from "https://cdn.jsdelivr.net/npm/@zip.js/zip.js@2.7.29/+esm";
};
return rt;
}
const readFile=(file)=>{
return new Promise((resolve,reject)=>{
let reader = new FileReader();
reader.addEventListener('load', function (e) {
resolve(e.target.result);
});
reader.readAsBinaryString(file);
});
}
const checkImageFile=(file,isFull)=>{
let minSize=MINSIZE+(isFull?(UPDATE_START-FULL_START):0);
return new Promise(function (resolve, reject) {