ring

zendevil 2021-01-23T14:24:32.006900Z

I have a ring related issue posted in #clojure

zendevil 2021-01-23T14:28:09.007500Z

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

zendevil 2021-01-23T14:28:40.008100Z

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

zendevil 2021-01-23T15:44:40.008300Z

and the problem is not solved

dharrigan 2021-01-23T17:05:43.008500Z

Seems to work for me

dharrigan 2021-01-23T17:06:07.008800Z

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

dharrigan 2021-01-23T17:06:25.009Z

How are you posting the data?

dharrigan 2021-01-23T17:07:20.009200Z

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

dharrigan 2021-01-23T17:07:38.009500Z

The request is thus:

dharrigan 2021-01-23T17:07:46.009700Z

{: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 "/"}