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

Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
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
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
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
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
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
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
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

We're in Beta

About us Mission Statement