You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to upload through cast_attachments/3, I do this in the controller:
defupdate(conn,%{"id"=>id,"artist"=>artist_params})do# this contains the file params too.artist=Repo.get!(Artist,id)changeset=Artist.changeset(artist,artist_params)caseRepo.update(changeset)do{:ok,artist}->conn|>put_flash(:info,"some message")|>redirect(to: somewhere){:error,error}->render(conn,"edit.html",artist: artist,changeset: changeset)endend
It always goes back to the edit page when cast_attachments/3 is called. When I turn it off, it works correctly. If you pry it in the case results, it will render on its own and the pry would still be available.
Why does this happen?
The text was updated successfully, but these errors were encountered:
While trying to upload through cast_attachments/3, I do this in the controller:
It always goes back to the edit page when cast_attachments/3 is called. When I turn it off, it works correctly. If you pry it in the case results, it will render on its own and the pry would still be available.
Why does this happen?
The text was updated successfully, but these errors were encountered: