kokolegorille
Save liveview uploaded file to a custom tmp directory
Hello everyone,
I would like to save liveview file uploads to another directory than /tmp, for example /custom/tmp.
Is that possible?
Thanks for taking time
Marked As Solved
kokolegorille
Sorry for the question, I have been using many different syntax, and the last is working
But only after upgrading to Phoenix Liveview 1.1
socket
|> allow_upload(:medium,
accept: ~w(.mp4),
max_entries: 1,
auto_upload: true,
# Provide a limit, as the default is low
max_file_size: @max_file_size,
chunk_size: @chunk_size,
# writer: {:temporary, dir: "/export/tmp"}
# writer: fn _name, _entry, _socket -> {:temporary, dir: "/export/tmp"} end
# writer: fn _name, _entry, _socket -> {KokoWeb.CustomWriter, level: :debug} end
writer: fn _name, _entry, _socket -> {KokoWeb.CustomWriter, level: :debug, dir: "/export/tmp"} end
)
2
Popular in Questions
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
Hi everyone,
I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
Other popular topics
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch.
This project took far...
New
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: )
Hello all, this is ...
New
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
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this:
...
New
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
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
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New








