mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
Merge pull request #4570 from Cenadros/hotfix/fix-media-import
🐛 Fix medias not being imported using lib-penpot
This commit is contained in:
commit
db99e994c6
1 changed files with 7 additions and 5 deletions
|
@ -157,8 +157,10 @@
|
|||
(defn resolve-file-media
|
||||
([media]
|
||||
(resolve-file-media media false))
|
||||
([{:keys [id] :as media} thumbnail?]
|
||||
(dm/str
|
||||
(cond-> (u/join public-uri "assets/by-file-media-id/")
|
||||
(true? thumbnail?) (u/join (dm/str id "/thumbnail"))
|
||||
(false? thumbnail?) (u/join (dm/str id))))))
|
||||
([{:keys [id data-uri] :as media} thumbnail?]
|
||||
(if data-uri
|
||||
data-uri
|
||||
(dm/str
|
||||
(cond-> (u/join public-uri "assets/by-file-media-id/")
|
||||
(true? thumbnail?) (u/join (dm/str id "/thumbnail"))
|
||||
(false? thumbnail?) (u/join (dm/str id)))))))
|
||||
|
|
Loading…
Reference in a new issue