I get the following error. Putting the content-disposition header raises the same one.
19:23:16.197 [error] #PID<0.334.0> running Sharpie.Endpoint terminated
Server: localhost:4000 (http)
Request: POST /api/images
** (exit) an exception was raised:
** (FunctionClauseError) no function clause matching in Plug.Conn.resp/3
(plug) lib/plug/conn.ex:358: Plug.Conn.resp(%Plug.Conn{adapter: {Plug.Adapters.Cowboy.Conn, :...}, assigns: %{}, before_send: [#Function<1.122333005/1 in Plug.Logger.call/2>], cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "localhost", method: "POST", owner: #PID<0.334.0>, params: %{"img" => %Plug.Upload{content_type: "image/jpeg", filename: "288c71bbc50eb6a4f784f291c1e02692.jpg", path: "/var/folders/z9/mbk_9k2d36qg5r2dxvf32www0000gn/T//plug-1422/multipart-300195-841075"}}, path_info: ["api", "images"], peer: {{127, 0, 0, 1}, 50771}, port: 4000, private: %{phoenix_action: :convert, phoenix_controller: Sharpie.ImageController, phoenix_endpoint: Sharpie.Endpoint, phoenix_layout: {Sharpie.LayoutView, :application}, phoenix_pipelines: [], phoenix_route: #Function<1.14025333/1 in Sharpie.Router.match/4>, phoenix_router: Sharpie.Router, phoenix_view: Sharpie.ImageView, plug_session_fetch: #Function<1.121476067/1 in Plug.Session.fetch_session/1>}, query_string: "", remote_ip: {127, 0, 0, 1}, req_cookies: %Plug.Conn.Unfetched{aspect: :cookies}, req_headers: [{"host", "localhost:4000"}, {"connection", "keep-alive"}, {"content-length", "79089"}, {"cache-control", "no-cache"}, {"origin", "chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm"}, {"user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.91 Safari/537.36"}, {"content-type", "multipart/form-data; boundary=----WebKitFormBoundaryJxdFw5gqFsJ8bJ6i"}, {"accept", "*/*"}, {"dnt", "1"}, {"accept-encoding", "gzip, deflate"}, {"accept-language", "en-US,en;q=0.8,fr;q=0.6"}, {"cookie", "connect.sid=s%3A3z-R1IgqvHF80f4BofsL2Oms.Lf8a5pD%2FR%2BUsl4JqVDGltL%2FzLpb2IS7hmdbWYf3ElgI"}], resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}, {"x-request-id", "YmLY7DzYhzm+xyJgYxGT"}, {"content-type", "image/jpeg; charset=utf-8"}, {"content-disposition", "attachment; filename=foobar.jpeg"}], scheme: :http, script_name: [], secret_key_base: "fIiAF9t/pWlTgHPX4+WAp5bxp1EnwkSbAMBFxezV+Rij3y9xFT/dnVVnTXfSgbZE", state: :unset, status: nil}, 200, #PID<0.338.0>)
(plug) lib/plug/conn.ex:348: Plug.Conn.send_resp/3
(sharpie) web/controllers/image_controller.ex:1: Sharpie.ImageController.phoenix_controller_pipeline/2
(sharpie) lib/phoenix/router.ex:2: Sharpie.Router.call/2
(plug) lib/plug/debugger.ex:104: Plug.Debugger.wrap/3
(phoenix) lib/phoenix/endpoint/error_handler.ex:43: Phoenix.Endpoint.ErrorHandler.wrap/3
(sharpie) lib/sharpie/endpoint.ex:1: Sharpie.Endpoint.phoenix_endpoint_pipeline/2
(plug) lib/plug/debugger.ex:104: Plug.Debugger.wrap/3