mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 06:47:20 +08:00
fix: 文件名称检查支持中文
This commit is contained in:
@@ -276,7 +276,7 @@ const languageByPath = (path: string) => {
|
||||
}
|
||||
|
||||
const checkName = (name: string) => {
|
||||
return /^[a-zA-Z0-9_.@#$%\-\s[\]()]+$/.test(name)
|
||||
return /^[\p{L}\p{N}\p{P}\s]+$/u.test(name)
|
||||
}
|
||||
|
||||
const checkPath = (path: string) => {
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<template></template>
|
||||
<template>
|
||||
<div>
|
||||
<h1>UserList</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@@ -37,8 +37,8 @@ const uploadRequest = ({ file, onFinish, onError, onProgress }: UploadCustomRequ
|
||||
<n-alert type="info">若上传报网络错误,请开启面板 HTTPS 后重试</n-alert>
|
||||
<n-upload
|
||||
ref="upload"
|
||||
directory-dnd
|
||||
multiple
|
||||
|
||||
multiple directory-dnd
|
||||
action="/api/panel/file/upload"
|
||||
:custom-request="uploadRequest"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user