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 <xyhp915@qq.com>
pull/7466/head
Siddharth Yadav 2022-11-25 12:23:17 +05:30 committed by GitHub
parent d5fb4b1ed0
commit e12c6db748
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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"))