Bläddra i källkod

Fix: Cannot upload assets with certain formats. (#7452)

* add text-format and a few other formats uploaded by users to the supported ext name

Co-authored-by: charlie <[email protected]>
Siddharth Yadav 3 år sedan
förälder
incheckning
e12c6db748
2 ändrade filer med 4 tillägg och 2 borttagningar
  1. 2 1
      src/main/frontend/config.cljs
  2. 2 1
      src/main/frontend/util.cljc

+ 2 - 1
src/main/frontend/config.cljs

@@ -112,7 +112,8 @@
   ([input] (extname-of-supported?
             input
             [image-formats doc-formats audio-formats
-             video-formats markup-formats html-render-formats]))
+             video-formats markup-formats html-render-formats
+             (gp-config/text-formats)]))
   ([input formats]
    (when-let [input (some->
                      (cond-> input

+ 2 - 1
src/main/frontend/util.cljc

@@ -11,6 +11,7 @@
             ["remove-accents" :as removeAccents]
             ["sanitize-filename" :as sanitizeFilename]
             ["check-password-strength" :refer [passwordStrength]]
+            ["path-complete-extname" :as pathCompleteExtname]
             [frontend.loader :refer [load]]
             [cljs-bean.core :as bean]
             [cljs-time.coerce :as tc]
@@ -43,7 +44,7 @@
        (-write writer (str "\"" (.toString sym) "\"")))))
 
 #?(:cljs (defonce ^js node-path utils/nodePath))
-#?(:cljs (defonce ^js full-path-extname utils/fullPathExtname))
+#?(:cljs (defonce ^js full-path-extname pathCompleteExtname))
 #?(:cljs (defn app-scroll-container-node
            ([]
             (gdom/getElement "main-content-container"))