diff --git a/frontend/src/app/main/ui/handoff/attributes/image.cljs b/frontend/src/app/main/ui/handoff/attributes/image.cljs index f26c1740c..30ffb53d4 100644 --- a/frontend/src/app/main/ui/handoff/attributes/image.cljs +++ b/frontend/src/app/main/ui/handoff/attributes/image.cljs @@ -29,7 +29,8 @@ "image/jpeg" "jpg" "image/png" "png" "image/svg+xml" "svg" - "image/webp" "webp")) + "image/webp" "webp" + nil)) (mf/defc image-panel [{:keys [shapes locale]}] (let [shapes (->> shapes (filter has-image?))] @@ -50,8 +51,11 @@ [:& copy-button {:data (cg/generate-css-props shape :height)}]] (let [mtype (-> shape :metadata :mtype) - name (:name shape)] + name (:name shape) + extension (mtype->extension mtype)] [:a.download-button {:target "_blank" - :download (str name "." (mtype->extension mtype)) + :download (if extension + (str name "." extension) + name) :href (cfg/resolve-file-media (-> shape :metadata))} (t locale "handoff.attributes.image.download")])])))