Multiple File Upload

Adding multiple:true option did the trick!

However, Plug.Upload doesn’t seem to have an array of filenames. It only has filename: binary plug/lib/plug/upload.ex at main · elixir-plug/plug · GitHub.

If we had multiple file inputs and if the user selected photos for all of them, we would have multiple files in this directory. Plug will make sure all the filenames are unique.

So I guess I’ll have to access the system files to get the names?


Update.
I tried to print out the files in the director but I got this: could not list directory "/var/folders/tm/4nhcmhhx5sbcg1st3_kywz400000gn/T//plug-1471/multipart-498792-367218-1": not a directory

I created a github issue to further investigate: https://github.com/elixir-lang/plug/issues/436