mirror of
https://github.com/logseq/logseq.git
synced 2026-04-28 08:04:40 +00:00
Feature/attachment with native fs (#1078)
* feat: upload image with native fs * improve: life of loading assets image file with nfs Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
[frontend.spec :as spec]
|
||||
[cljs-time.core :as t]
|
||||
[cljs-time.format :as tf]
|
||||
[frontend.config :as config]))
|
||||
[frontend.config :as config]
|
||||
["/frontend/utils" :as utils]))
|
||||
|
||||
(defn get-ref
|
||||
[repo-url]
|
||||
@@ -142,3 +143,12 @@
|
||||
(do (log/error :token/failed-get-token token-m)
|
||||
(reject)))))
|
||||
nil))))))))
|
||||
|
||||
(defn verify-permission
|
||||
[repo handle read-write?]
|
||||
(let [repo (or repo (state/get-current-repo))]
|
||||
(p/then
|
||||
(utils/verifyPermission handle read-write?)
|
||||
(fn []
|
||||
(state/set-state! [:nfs/user-granted? repo] true)
|
||||
true))))
|
||||
Reference in New Issue
Block a user