, on "change" (D.map GotFiles filesDecoder)
-- File upload with the <input type="file"> node.
--
-- Dependencies:
-- elm install elm/file
-- elm install elm/json
import Browser
import File exposing (File)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Json.Decode as D
-- MAIN
main =
Browser.element
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
}
-- MODEL
type alias Model = List File
init : () -> (Model, Cmd Msg)
init _ =
([], Cmd.none)
-- UPDATE
type Msg
= GotFiles (List File)