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:
@@ -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")
|
||||
|
||||
// 初始化时区
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user