2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 06:47:20 +08:00

feat: 发布v2.3.3

This commit is contained in:
耗子
2024-10-13 22:48:37 +08:00
parent f235492f8b
commit 80bfe50335
5 changed files with 8 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ func initConf() {
func initGlobal() {
app.Root = app.Conf.MustString("app.root")
app.Version = "2.3.2"
app.Version = "2.3.3"
app.Locale = app.Conf.MustString("app.locale")
// 初始化时区

View File

@@ -217,7 +217,7 @@ func Http(r chi.Router) {
r.Get("/content", file.Content)
r.Post("/save", file.Save)
r.Post("/delete", file.Delete)
r.Post("/upload", file.Upload) // TODO fix
r.Post("/upload", file.Upload)
r.Post("/move", file.Move)
r.Post("/copy", file.Copy)
r.Get("/download", file.Download)

View File

@@ -62,6 +62,10 @@ func (s *BackupService) Upload(w http.ResponseWriter, r *http.Request) {
}
_, handler, err := r.FormFile("file")
if err != nil {
Error(w, http.StatusInternalServerError, "上传文件失败:%v", err)
return
}
path, err := s.backupRepo.GetPath(biz.BackupType(r.FormValue("type")))
if err != nil {
Error(w, http.StatusInternalServerError, "%v", err)

View File

@@ -128,7 +128,7 @@ func (s *FileService) Upload(w http.ResponseWriter, r *http.Request) {
path := r.FormValue("path")
_, handler, err := r.FormFile("file")
if err != nil {
Error(w, http.StatusInternalServerError, "%v", err)
Error(w, http.StatusInternalServerError, "上传文件失败:%v", err)
return
}
if io.Exists(path) {

View File

@@ -128,7 +128,7 @@ func (s *FileService) Upload(w http.ResponseWriter, r *http.Request) {
path := r.FormValue("path")
_, handler, err := r.FormFile("file")
if err != nil {
Error(w, http.StatusInternalServerError, "%v", err)
Error(w, http.StatusInternalServerError, "上传文件失败:%v", err)
return
}
if io.Exists(path) {