feat(electron): support upload any asset types

This commit is contained in:
charlie
2021-01-28 15:57:42 +08:00
parent 5c30e0b47e
commit 32c2d4f268
7 changed files with 44 additions and 2 deletions

View File

@@ -1610,7 +1610,8 @@
(when-let [[url file] (and (seq res) (first res))]
(insert-command!
id
(get-image-link format (get-asset-link url) (if file (.-name file) "image"))
(get-image-link format (get-asset-link url)
(if file (.-name file) (if (util/ext-of-image? url) "image" "asset")))
format
{:last-pattern (if drop-or-paste? "" commands/slash)
:restore? true}))))