From 31c5dcdb8146bbc9e8a31a943543e88603ea0586 Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Thu, 4 Jul 2024 20:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=A4=9A=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fssc/internal/handler/handler.go | 2 +- fssc/internal/handler/webconsole.go | 2 ++ fssc/web/wbconsole.tmpl | 39 ++++++++++++++++++++++++----- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/fssc/internal/handler/handler.go b/fssc/internal/handler/handler.go index 693f9cb..7f84e28 100644 --- a/fssc/internal/handler/handler.go +++ b/fssc/internal/handler/handler.go @@ -161,7 +161,7 @@ func SendZip(w http.ResponseWriter, r *http.Request) { fmt.Println("archive is not exist!!!") } // 执行完 跳转到 首页 - http.Redirect(w, r, "/", http.StatusFound) + //http.Redirect(w, r, "/", http.StatusFound) } // 发送拦截 diff --git a/fssc/internal/handler/webconsole.go b/fssc/internal/handler/webconsole.go index 52846e8..4f22f38 100644 --- a/fssc/internal/handler/webconsole.go +++ b/fssc/internal/handler/webconsole.go @@ -20,6 +20,7 @@ func WebConsole(w http.ResponseWriter, r *http.Request) { if urlpath == "Li4=" { urlpath = "" } + //文件名 fname := r.URL.Query().Get("f") //转码 @@ -39,6 +40,7 @@ func WebConsole(w http.ResponseWriter, r *http.Request) { downloadPath := filepath.Join(filepath.Base(config.G.FilePath), abupath) // 相对路径 relpath := filepath.Join(abupath, "../") + fmt.Printf("relpath is %s\n", relpath) // fileInfo, err := os.Stat(realFilePath) if err != nil { diff --git a/fssc/web/wbconsole.tmpl b/fssc/web/wbconsole.tmpl index 19fe120..a2a341c 100644 --- a/fssc/web/wbconsole.tmpl +++ b/fssc/web/wbconsole.tmpl @@ -64,7 +64,7 @@
服务器ip
- +
@@ -88,7 +88,7 @@ home 返回上层 全选 - 同步 + 同步

@@ -117,6 +117,8 @@ {{ end }} + +
@@ -155,17 +157,29 @@