feat: add examples: form-upload (#5955)

* feat: add examples: form-upload

* fix: upload: accept and label

* fix: upload: 设置表单值、图片预览
This commit is contained in:
yuh
2025-04-17 14:00:46 +08:00
committed by GitHub
parent f7a4d13a4c
commit 4baec83db5
6 changed files with 106 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
import { verifyAccessToken } from '~/utils/jwt-utils';
import { unAuthorizedResponse } from '~/utils/response';
export default eventHandler((event) => {
const userinfo = verifyAccessToken(event);
if (!userinfo) {
return unAuthorizedResponse(event);
}
return useResponseSuccess({
url: 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/logo-v1.webp',
});
// return useResponseError("test")
});