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()})