fix: 再次修复服务器更新相关逻辑
This commit is contained in:
1 parent
23a824ad50
commit
934bc15cb8
2 files changed
+4
-4
No files matched your search
@@ -6,13 +6,13 @@
|
|||||||
{{ item[0] }}
|
{{ item[0] }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<div>
|
<div>
|
||||||
测试更新
|
测试更新 !!!
|
||||||
<el-upload :auto-upload="false" v-model="fileList" action="/api/system/update" ref="uploadRef" :headers="headers">
|
<el-upload :auto-upload="false" v-model="fileList" action="/api/system/update" ref="uploadRef" :headers="headers" draggable="true">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button type="primary">选择更新包</el-button>
|
<el-button type="primary">选择更新包</el-button>
|
||||||
</template>
|
</template>
|
||||||
<el-button class="ml-3" type="success" @click="submitUpload">
|
<el-button class="ml-3" type="success" @click="submitUpload">
|
||||||
上传更新包
|
点击上传更新包
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
const file = data.get('file') as File
|
const file = data.get('file') as File
|
||||||
const buffer = await file.arrayBuffer()
|
const buffer = await file.arrayBuffer()
|
||||||
const uint8Array = new Uint8Array(buffer)
|
const uint8Array = new Uint8Array(buffer)
|
||||||
fs.writeFileSync('./.output.tar.gz', uint8Array, {
|
fs.writeFileSync('./output.tar.gz', uint8Array, {
|
||||||
flag: 'w',
|
flag: 'w',
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
Reference in new issue
Block a user