Skip to content

protocol Jason.Encoder not implemented for %Plug.Upload #808

Closed
@thiagogsr

Description

@thiagogsr

Hello

I'm upgrading my Phoenix to 1.4 and it is raising error in controllers that I use %Plug.Upload{}:

** (Protocol.UndefinedError) protocol Jason.Encoder not implemented for %Plug.Upload{content_type: "jpg", filename: "bar.jpg", path: "/foo/bar.jpg"}, Jason.Encoder protocol must always be explicitly implemented.

Shouldn't it be implemented by the plug or we should define it in my app using Protocol.derive(Jason.Encoder, Plug.Upload)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions