fix(import): remove asset byte-array usage to prevent OOM

This commit also combine read-asset and copy-asset to read-and-copy-asset
This commit is contained in:
Tienson Qin
2025-09-26 20:39:17 +08:00
committed by Gabriel Horner
parent b4d3fb4284
commit 971cec54bc
6 changed files with 130 additions and 129 deletions

View File

@@ -16,6 +16,11 @@
[promesa.core :as p])
(:import [missionary Cancelled]))
(defn exceed-limit-size?
"Asset size no more than 100M"
[^js file]
(> (.-size file) (* 100 1024 1024)))
(defn alias-enabled?
[]
(and (util/electron?)