From 40bc1fac7376f6a8bb512c6bf9063661adf97414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20S=C3=A1nchez?= Date: Thu, 9 May 2024 10:36:49 +0200 Subject: [PATCH] :bug: Fix medias not being imported using lib-penpot --- frontend/src/app/config.cljs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/config.cljs b/frontend/src/app/config.cljs index c95f72e1a..7fba68aa2 100644 --- a/frontend/src/app/config.cljs +++ b/frontend/src/app/config.cljs @@ -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)))))))