Merge pull request #2743 from penpot/niwinz-enhancements-2

🐛 Bugfixes
This commit is contained in:
Alejandro 2023-01-10 09:56:45 +01:00 committed by GitHub
commit b132837432
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 756 additions and 547 deletions

View file

@ -93,7 +93,7 @@
(->> (rx/from uris)
(rx/filter (comp not svg-url?))
(rx/map prepare)
(rx/mapcat #(rp/mutation! :create-file-media-object-from-url %))
(rx/mapcat #(rp/command! :create-file-media-object-from-url %))
(rx/do on-image))
(->> (rx/from uris)

View file

@ -466,9 +466,10 @@
{:name (extract-name uri)
:url uri}))))
(rx/mapcat (fn [uri-data]
(->> (rp/mutation! (if (contains? uri-data :content)
:upload-file-media-object
:create-file-media-object-from-url) uri-data)
(->> (rp/command! (if (contains? uri-data :content)
:upload-file-media-object
:create-file-media-object-from-url)
uri-data)
;; When the image uploaded fail we skip the shape
;; returning `nil` will afterward not create the shape.
(rx/catch #(rx/of nil))