mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 19:41:05 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
ae59311825
@ -283,11 +283,16 @@ func exportResources(c *gin.Context) {
|
|||||||
name = time.Now().Format("export-2006-01-02_15-04-05") // 生成的 *.zip 文件主文件名
|
name = time.Now().Format("export-2006-01-02_15-04-05") // 生成的 *.zip 文件主文件名
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if nil == arg["paths"] {
|
||||||
|
ret.Code = 1
|
||||||
|
ret.Data = ""
|
||||||
|
ret.Msg = "paths is required"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var resourcePaths []string // 文件/文件夹在工作空间中的路径
|
var resourcePaths []string // 文件/文件夹在工作空间中的路径
|
||||||
if nil != arg["paths"] {
|
for _, resourcePath := range arg["paths"].([]interface{}) {
|
||||||
for _, resourcePath := range arg["paths"].([]interface{}) {
|
resourcePaths = append(resourcePaths, resourcePath.(string))
|
||||||
resourcePaths = append(resourcePaths, resourcePath.(string))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
zipFilePath, err := model.ExportResources(resourcePaths, name)
|
zipFilePath, err := model.ExportResources(resourcePaths, name)
|
||||||
|
Loading…
Reference in New Issue
Block a user