Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Support opening assets through other apps on the Android https://github.com/siyuan-note/siyuan/issues/10657

Daniel76b2036eed82
diff --git a/kernel/mobile/kernel.go b/kernel/mobile/kernel.go
index adc6a0bf13..7aff63245d 100644
--- a/kernel/mobile/kernel.go
+++ b/kernel/mobile/kernel.go
@@ -24,6 +24,7 @@ import (
"time"
"github.com/siyuan-note/filelock"
+ "github.com/siyuan-note/logging"
"github.com/siyuan-note/siyuan/kernel/cache"
"github.com/siyuan-note/siyuan/kernel/job"
"github.com/siyuan-note/siyuan/kernel/model"
@@ -89,6 +90,15 @@ func GetCurrentWorkspacePath() string {
return util.WorkspaceDir
}
+func GetAssetAbsPath(asset string) (ret string) {
+ ret, err := model.GetAssetAbsPath(asset)
+ if nil != err {
+ logging.LogErrorf("get asset [%s] abs path failed: %s", asset, err)
+ ret = asset
+ }
+ return
+}
+
func SetTimezone(container, appDir, timezoneID string) {
if "ios" == container {
os.Setenv("ZONEINFO", filepath.Join(appDir, "app", "zoneinfo.zip"))