tfwright

tfwright

File upload/attachment/storage lib

Any recommendations for handling file attachment and storage in Elixir/Phoenix? Arc looks like the OG lib but hasn’t had much activity for almost 2 years. Waffle looks like a well marketed fork that claims the original is no longer “supported”, but I don’t see any notice to that effect.

Are folks mostly using one of those two? Rolling your own?

Most Liked

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

It will go just fine. To quote the AWS documentation:

The current version of the Amazon S3 API is 2006-03-01.

The API hasn’t had a backwards incompatible change in 14 years, at least according to its docs. ExAws deprecation is more about forward compatibility with new AWS services and less about backward compatibility with existing ones.

Matsa59

Matsa59

Write your code without create any coupling with your storage system. So if you want to change to another lib, you will not change any of your business stuff. In that way, you’ll be ok to use ExAws even if you think it will be deprecated.

But as said @benwilson512 aws api doesn’t break backward compatibilty. You should be ok for the next decade (or something like that).

tfwright

tfwright

I ended up rolling my own, and I decided to put it in its own lib. I’m not sure if I’ll expand it enough to merit releasing a package, but if anyone’s interested the source is on Github:

It takes a lot of inspiration from Ruby’s Shrine, but with the spirit (patterns) of Elixir. It only handles url -> local storage right now. I’ll at least be adding binary, and Plug.Upload support, probably Ecto support.

Matsa59

Matsa59

Manage file attachement by myself and use separate storage lib depending of the need (e.g. s3 lib).
File attachment is really easy in Phoenix.

crockwave

crockwave

It appears that the link has changed:

https://github.com/elixir-capsule/capsule

Where Next?

Popular in Questions Top

gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
aalberti333
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
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
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
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
hpopp
To simplify some tasks at work, I wrote and published this package yesterday. It’s a simple macro that enables Access behaviour on struct...
New
sabri
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size? Thanks
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

yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
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
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
fayddelight
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
Fl4m3Ph03n1x
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
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
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement