0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 16:30:37 -05:00

🐛 Don't send url on file-media-upload

This commit is contained in:
Andrey Antukh 2022-04-22 11:48:18 +02:00 committed by Alonso Torres
parent cfe374b08c
commit 58cfd61997

View file

@ -431,15 +431,14 @@
;; all shapes.
(->> (rx/from (usvg/collect-images svg-data))
(rx/map (fn [uri]
(d/merge
(merge
{:file-id file-id
:is-local true
:url uri}
:is-local true}
(if (str/starts-with? uri "data:")
{:name "image"
:content (uu/data-uri->blob uri)}
{:name (uu/uri-name uri)}))))
{:name (uu/uri-name uri)
:url uri}))))
(rx/mapcat (fn [uri-data]
(->> (rp/mutation! (if (contains? uri-data :content)
:upload-file-media-object