From 62197b382dc4e646ad961dfc7b585777b74ab992 Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Wed, 14 May 2025 19:12:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=B6=E4=BD=9Cppt?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E4=BC=9A=E8=AF=9D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/tool.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/handler/tool.go b/handler/tool.go index c9c35df..9264bd5 100644 --- a/handler/tool.go +++ b/handler/tool.go @@ -16,6 +16,7 @@ import ( "net/url" "os" "strconv" + "strings" "time" ) @@ -571,6 +572,9 @@ func CreateSparkPPTSOutline(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"error": "file name is empty", "code": proto.ParameterError, "message": "failed"}) return } + if strings.Contains(req.FileUrl, "http") == false { + req.FileUrl = "https://pm.ljsea.top/tool/file/" + req.FileUrl + } err3 := service.CheckUserCreatePPTSessionPermission(userID) if err3 != nil { c.JSON(http.StatusOK, gin.H{"error": "user create ppt session permission error", "code": proto.ParameterError, "message": err3.Error()})