Fork me on GitHub
#ring
<
2021-01-23
>
zendevil.eth14:01:32

I have a ring related issue posted in #clojure

zendevil.eth14:01:09

my multipart params is {} even though I have wrap-multipart-params middleware and sending a multipart request

zendevil.eth14:01:40

and I don’t know how to extract the file data from the request

zendevil.eth15:01:40

and the problem is not solved

dharrigan17:01:43

Seems to work for me

dharrigan17:01:07

:multipart-params {"hello" "world"}

dharrigan17:01:25

How are you posting the data?

dharrigan17:01:20

http --multipart POST :3000 @foo.txt hello=world

dharrigan17:01:38

The request is thus:

dharrigan17:01:46

{:body #<org.eclipse.jetty.server.HttpInputOverHTTP@3186a68 HttpInputOverHTTP@3186a68[c=260,q=0,[0]=null,s=STREAM]>,
 :character-encoding nil,
 :content-length 260,
 :content-type "multipart/form-data; boundary=260d5818b6494665addc9c1335b26fc5",
 :form-params {},
 :headers {"accept" "*/*",
           "accept-encoding" "gzip, deflate",
           "connection" "keep-alive",
           "content-length" "260",
           "content-type" "multipart/form-data; boundary=260d5818b6494665addc9c1335b26fc5",
           "host" "localhost:3000",
           "user-agent" "HTTPie/2.3.0"},
 :multipart-params {"hello" "world"},
 :params {"hello" "world"},
 :protocol "HTTP/1.1",
 :query-params {},
 :query-string nil,
 :remote-addr "127.0.0.1",
 :request-method :post,
 :scheme :http,
 :server-name "localhost",
 :server-port 3000,
 :ssl-client-cert nil,
 :uri "/"}