justincjohnson

justincjohnson

Using Live Uploader with React

Hi,

Does anyone know if it is possible to use Phoenix Live Uploads to upload files to a Phoenix server with React?

The project I’m working on currently uses a mix of Phoenix templates and React for front end code. When we started the project we were looking for an option similar to LiveView but LiveView didn’t exist at the time. As a result, we are now somewhat heavily invested in React.

Our current file upload code is template based but needs to be converted to React. I see the gist of how the Live Upload code works, how files are loaded in the browser with a FileReader and chunked over channels, etc, and am hoping to avoid reimplementing the code in a way that works with React. The main functionality I’m hoping to utilize is transferring file contents to the server over channels and associated server side book keeping. I looked at the docs and searched online but haven’t found anything that quite matches my question.

Any guidance is appreciated. Thank you.

Justin

First Post!

serpent

serpent

(for the Googlez)

Did not try it out, yet. Looks good on the surface. :slightly_smiling_face:

Where Next?

Popular in Questions Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54996 245
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New

We're in Beta

About us Mission Statement