phoenix_live_view icon indicating copy to clipboard operation
phoenix_live_view copied to clipboard

`upload_name` in `allow_upload` requires an atom but a string would make more sense

Open luka-TU opened this issue 3 years ago • 0 comments

Environment

  • Elixir version (elixir -v): all
  • Phoenix version (mix deps): all
  • Phoenix LiveView version (mix deps): all
  • Operating system: macOs
  • Browsers you attempted to reproduce this bug on (the more the merrier): all
  • Does the problem persist after removing "assets/node_modules" and trying again? Yes

Actual behavior

allow_upload requires an upload_name as an argument, and it requires an atom. We generate multiple uploads dynamically so we have to construct this argument to make it unique, converting it from string via String.to_atom.

Expected behavior

I think making it into a string makes sense to avoid multiplying atoms.

luka-TU avatar Jul 29 '22 06:07 luka-TU