Giter Club home page Giter Club logo

Comments (4)

MatthewRDodds avatar MatthewRDodds commented on July 25, 2024 1

Ah, that's my issue, before I was using Ecto.build_assoc which must not run through the changeset either, but when I use a changeset in the simple example I no longer see the error. Thanks!

from arc_ecto.

MatthewRDodds avatar MatthewRDodds commented on July 25, 2024

A simpler reproduction is:

MyApp.Repo.insert(
  %MyApp.Attachment{
    file: %Plug.Upload{
      content_type: "image/png",
      filename: "Screen Shot 2016-09-07 at 3.28.23 PM.png",
      path: "/var/folders/6v/wlbdtzc11z52b2q5lxttmg4m0000gn/T//plug-1473/multipart-285821-783023-1"
    }
  }
)

That gives me the same backtrace as above.

from arc_ecto.

stavro avatar stavro commented on July 25, 2024

The "simpler reproduction" is missing a necessary call to cast_attachments - the %Plug.Upload{} should not be set to the attribute field directly.

In the first example, can you show me how you are calling MyApp.Attachment.changeset from your controller?

from arc_ecto.

stavro avatar stavro commented on July 25, 2024

👍 Good to hear!

from arc_ecto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.