mirror of
https://github.com/logseq/logseq.git
synced 2026-04-25 06:35:02 +00:00
enhance: notify users when assets exceed max size
so they are aware why asset was ignored. Also if asset ids are not present we should fail loudly like we everywhere else in the importer. Users should know when data is missing instead of hiding it in the console. Also refactor confusing usage of :block/uuid to :asset-created? as it was only used to track the first time an asset is built to be transacted
This commit is contained in:
committed by
Gabriel Horner
parent
91657bfcce
commit
846f9307c3
2
deps/graph-parser/script/db_import.cljs
vendored
2
deps/graph-parser/script/db_import.cljs
vendored
@@ -61,7 +61,7 @@
|
||||
asset-name (gp-exporter/asset-path->name (:path file))
|
||||
asset-type (db-asset/asset-path->type (:path file))]
|
||||
(if (exceed-limit-size? buffer)
|
||||
(js/console.error (str "Asset size shouldn't be larger than 100M, path: " (:path file)))
|
||||
(js/console.log (str "Skipped copying asset " (pr-str (:path file)) " because it is larger than the 100M max."))
|
||||
(p/let [parent-dir (node-path/join db-graph-dir common-config/local-assets-dir)
|
||||
{:keys [with-edn-content pdf-annotation?]} (buffer-handler buffer)]
|
||||
(fsp/mkdir parent-dir #js {:recursive true})
|
||||
|
||||
Reference in New Issue
Block a user