Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-21 18:42:32 +08:00
parent 6588af2f32
commit 1c48345150
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 42 additions and 0 deletions

View file

@ -406,6 +406,38 @@ func uploadCloud(c *gin.Context) {
util.PushMsg(fmt.Sprintf(model.Conf.Language(41), count), 3000)
}
func uploadCloudByAssetsPaths(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, ok := util.JsonArg(c, ret)
if !ok {
return
}
if nil == arg["paths"] {
ret.Code = -1
ret.Msg = "paths is required"
return
}
pathsArg := arg["paths"].([]interface{})
var assets []string
for _, pathArg := range pathsArg {
assets = append(assets, pathArg.(string))
}
count, err := model.UploadAssets2CloudByAssetsPaths(assets)
if err != nil {
ret.Code = -1
ret.Msg = err.Error()
ret.Data = map[string]interface{}{"closeTimeout": 3000}
return
}
util.PushMsg(fmt.Sprintf(model.Conf.Language(41), count), 3000)
}
func insertLocalAssets(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)