Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes on File Uploads #3

Closed
sheharyarn opened this issue Aug 15, 2017 · 0 comments
Closed

Crashes on File Uploads #3

sheharyarn opened this issue Aug 15, 2017 · 0 comments

Comments

@sheharyarn
Copy link
Owner

When the web request contains a %Plug.Upload{} struct, it crashes the process with a Protocol.UndefinedError:

[error] #PID<0.737.0> running MyApp.Endpoint terminated
Server: localhost:5000 (http)
Request: POST /some/server/path
** (exit) an exception was raised:
    ** (Protocol.UndefinedError) protocol Enumerable not implemented for %Plug.Upload{content_type: "image/jpeg", filename: "123456789.jpg", path: "/var/folders/rr/1l6bz6rd6tq_h70m1scxy51m0000gn/T//plug-1502/multipart-837302-850377-2"}
        (elixir) lib/enum.ex:1: Enumerable.impl_for!/1
        (elixir) lib/enum.ex:116: Enumerable.reduce/3
        (elixir) lib/enum.ex:1767: Enum.reduce/3
        lib/better_params.ex:79: anonymous fn/2 in BetterParams.symbolize_keys/1
        (stdlib) lists.erl:1263: :lists.foldl/3
        lib/better_params.ex:68: BetterParams.symbolize_merge/1
        lib/better_params.ex:36: BetterParams.call/2
        ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant