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:
Gabriel Horner
2025-09-29 17:17:16 -04:00
parent 6260885c34
commit 23b22dfe3d
3 changed files with 26 additions and 15 deletions

View File

@@ -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})