0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-25 07:58:49 -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:
Alejandro 2024-05-10 10:33:21 +02:00 committed by GitHub
commit db99e994c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -157,8 +157,10 @@
(defn resolve-file-media (defn resolve-file-media
([media] ([media]
(resolve-file-media media false)) (resolve-file-media media false))
([{:keys [id] :as media} thumbnail?] ([{:keys [id data-uri] :as media} thumbnail?]
(dm/str (if data-uri
(cond-> (u/join public-uri "assets/by-file-media-id/") data-uri
(true? thumbnail?) (u/join (dm/str id "/thumbnail")) (dm/str
(false? thumbnail?) (u/join (dm/str id)))))) (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)))))))