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,12 +283,17 @@ func exportResources(c *gin.Context) {
|
||||
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 // 文件/文件夹在工作空间中的路径
|
||||
if nil != arg["paths"] {
|
||||
for _, resourcePath := range arg["paths"].([]interface{}) {
|
||||
resourcePaths = append(resourcePaths, resourcePath.(string))
|
||||
}
|
||||
}
|
||||
|
||||
zipFilePath, err := model.ExportResources(resourcePaths, name)
|
||||
if nil != err {
|
||||
|
Loading…
Reference in New Issue
Block a user