Files
GoCode/templates/admin/useredit.html
nannanwu 4229a59d89 feat(admin): 添加用户编辑及多文件上传功能
- 新增用户编辑页面及路由支持 GET /user/edit 和 POST /user/doEdit
- 实现多文件上传接口,支持上传两个头像文件并保存
- 完善单文件上传接口,增加目录创建及错误处理
- 增加首页设置和获取 cookie 功能,支持 cookie 删除接口
- 修改路由配置,新增删除 cookie 路由 /deletecookie
- 新增用户编辑页面模板,示范多文件上传表单布局
2026-02-25 15:57:02 +08:00

24 lines
705 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{ define "admin/useredit" }}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h1>演示多文件上传</h1>
<form action="/admin/user/doEdit" method="post" enctype="multipart/form-data">
<label for="username">用户名:</label>
<input type="text" id="username" name="username" placeholder="用户名">
<br>
<label for="face">头 像1</label>
<input type="file" id="face" name="face1">
<br>
<label for="face2">头 像2</label>
<input type="file" id="face2" name="face2">
<br>
<input type="submit" value="上传">
</form>
</body>
</html>
{{ end }}