This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-12
Channels
- # announcements (10)
- # babashka (26)
- # beginners (113)
- # calva (75)
- # cider (7)
- # clj-http (1)
- # cljdoc (2)
- # cljfx (3)
- # cljs-dev (13)
- # clojure (79)
- # clojure-europe (21)
- # clojure-losangeles (2)
- # clojure-nl (4)
- # clojure-sweden (1)
- # clojure-uk (23)
- # clojureladies (4)
- # clojurescript (26)
- # clojureverse-ops (2)
- # conjure (2)
- # cursive (2)
- # data-science (1)
- # datalog (6)
- # datomic (1)
- # degree9 (2)
- # depstar (4)
- # esprit (3)
- # fulcro (25)
- # introduce-yourself (2)
- # jobs (3)
- # lsp (30)
- # meander (38)
- # missionary (9)
- # nbb (7)
- # news-and-articles (2)
- # off-topic (28)
- # pathom (46)
- # polylith (19)
- # re-frame (4)
- # reitit (2)
- # sci (8)
- # shadow-cljs (23)
- # specter (17)
- # spire (1)
- # tools-deps (16)
- # unrepl (1)
- # xtdb (30)
I'm trying to do a multipart file upload of a directory. Here's my request:
(let [files (->> (file-seq (io/file path)) (map io/file)
(filter #(.exists %))
(remove #(.isDirectory %)))]
(http/post (str ENDPOINT "/add")
{:as :json
:multipart (concat
[{:name "file"
:filename "assets/cards/metadata/small"
:mime-type "application/x-directory"
:content (io/file "assets/cards/metadata/small")}]
(map
(fn [f]
{:name "file"
:filename (.getPath f)
:content f})
files))}))
getting the error
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2). assets/cards/metadata/small (Is a directory).
but if I remove the directory section, only the first file in the directory gets uploaded. any tips on how to troubleshoot this?