Skip to content

Commit

Permalink
'|' is not permit for filename in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
free-kingdom committed Jan 9, 2025
1 parent c0a02ee commit dac1bcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/com/fulcrologic/fulcro/networking/file_upload.clj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
(try
(let [ast (eql/query->ast txn)
mutation->files (reduce (fn [result {:keys [filename] :as file}]
(enc/if-let [[mutation-name filename] (some-> filename (str/split #"[|]"))
(enc/if-let [[mutation-name filename] (some-> filename (str/split #"[%]"))
mutation-sym (some-> mutation-name (edn/read-string))]
(update result mutation-sym (fnil conj []) (assoc file :filename filename))
(do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
(doseq [{:keys [dispatch-key params]} (:children ast)]
(when-let [uploads (::uploads params)]
(doseq [{:file/keys [name content content-type]} uploads]
(let [name-with-mutation (str dispatch-key "|" name)
(let [name-with-mutation (str dispatch-key "%" name)
js-value (-> content meta :js-value)
content (some-> js-value (js-value->uploadable-object content-type))]
(.append form "files" content name-with-mutation)))))
Expand Down

0 comments on commit dac1bcc

Please sign in to comment.