@mchampine has joined the channel
Hi all. When I upload a jpeg via curl, the content-type gets set to image/jpeg.
curl -L -X POST " " -F 'file=@mypic.jpg'
but when I upload via clj-http:
(client/post " " {:multipart
[{:name "file" :content ( "mypic.jpg")}]})
the file winds up as application/octet-stream. I have tried everything I can think of to specify the content type e.g. adding {:name “Content/type” :content “image/jpeg”} to the multipart vector, but to no avail.
Any idea how to emulate the curl behavior here, and have the content type set correctly on file uploads?
Thanks!Set this
[{:name "file" :content (
@dharrigan That worked!! Thank you!
You're most welcome 😉