I am trying to follow this https://youtu.be/QJkopba8yyE?t=52 to upload a file through Phoneix LiveView.
But getting allow_upload
API as undefined.
It seems to be missing from https://github.com/phoenixframework/phoenix_live_view/blob/master/lib/phoenix_live_view.ex
as well as from latest 0.14.7
code.
This video is barely a month old. Could it be that these features are yet not available.
That’s the case.
Thanks. Any alternative way to achieve file upload and mime-type check for Phoenix LiveView? @LostKobrakai
Until that ships you can try
2 Likes
You can try LiveView upload with phoenix_live_view cm-uploads-merge branch and phoenix master branch as this commit supports sending binary to channel.
3 Likes
Created a gist containing all necessary code for uploading. https://gist.github.com/goofansu/e3f8551a596373ef6370208bfc7db78d
8 Likes