🎨 Support directly access data/public/* contents via URL link https://github.com/siyuan-note/siyuan/issues/8593

This commit is contained in:
Daniel 2023-06-22 16:30:04 +08:00
parent bf5caa23f8
commit c540046b8e
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 12 additions and 0 deletions

View file

@ -355,6 +355,12 @@ func initPathDir() {
if err := os.MkdirAll(emojis, 0755); nil != err && !os.IsExist(err) {
logging.LogFatalf(logging.ExitCodeInitWorkspaceErr, "create data emojis folder [%s] failed: %s", widgets, err)
}
// Support directly access `data/public/*` contents via URL link https://github.com/siyuan-note/siyuan/issues/8593
public := filepath.Join(DataDir, "public")
if err := os.MkdirAll(public, 0755); nil != err && !os.IsExist(err) {
logging.LogFatalf(logging.ExitCodeInitWorkspaceErr, "create data public folder [%s] failed: %s", widgets, err)
}
}
func initMime() {