From 58cfd619973ccc4e3acbc972de0acf2969988c53 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 22 Apr 2022 11:48:18 +0200 Subject: [PATCH] :bug: Don't send url on file-media-upload --- frontend/src/app/main/data/workspace/svg_upload.cljs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/data/workspace/svg_upload.cljs b/frontend/src/app/main/data/workspace/svg_upload.cljs index b649250aa..148e9cb2e 100644 --- a/frontend/src/app/main/data/workspace/svg_upload.cljs +++ b/frontend/src/app/main/data/workspace/svg_upload.cljs @@ -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