ota_zip_get_info
v1.0.3
Published
```javascript import logo from './logo.svg'; import './App.css'; import {OtaZipGetInfo} from "ota_zip_get_info"
Downloads
6
Readme
import logo from './logo.svg';
import './App.css';
import {OtaZipGetInfo} from "ota_zip_get_info"
OtaZipGetInfo.regist("CLIENT","resources/extReouse/version.txt")
OtaZipGetInfo.regist("SERVER","package.json", content => JSON.parse(content).version, (zip)=>{
// 默认就判断 获取版本文件是否存在。这个函数没必要不用重写
if(!OtaZipGetInfo.isZip(zip)) {
return false;
}
return zip.file("plugin/camera/run_face.bat");
})
OtaZipGetInfo.format = r => r
function App() {
return (
<div className="App">
<input type='file' onChange={async (e)=>{
let file = e.target.files[0];
const res = await OtaZipGetInfo.getInfo(file)
console.log(res)
}}></input>
</div>
);
}
export default App;