mirror of
https://github.com/penpot/penpot.git
synced 2025-05-23 18:46:12 +02:00
🐛 Fix problem with import broken images
This commit is contained in:
parent
fe6623b342
commit
8a158146cd
2 changed files with 5 additions and 2 deletions
|
@ -255,7 +255,7 @@
|
|||
(let [name (cip/get-image-name node)
|
||||
data-uri (cip/get-image-data node)]
|
||||
(->> (upload-media-files file-id name data-uri)
|
||||
(rx/catch #(do (.error js/console %)
|
||||
(rx/catch #(do (.error js/console "Error uploading media: " name)
|
||||
(rx/of node)))
|
||||
(rx/map
|
||||
(fn [media]
|
||||
|
@ -370,7 +370,9 @@
|
|||
:content content
|
||||
:is-local false})))
|
||||
(rx/flat-map #(rp/mutation! :upload-file-media-object %))
|
||||
(rx/map (constantly media))))))
|
||||
(rx/map (constantly media))
|
||||
(rx/catch #(do (.error js/console (str "Error uploading media: " (:name media)) )
|
||||
(rx/empty)))))))
|
||||
(rx/reduce fb/add-library-media file)))
|
||||
|
||||
(rx/of file)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue