This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
API for FileReader, for file input and file drop zones.
version 2.0.1
license BSD3
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 2.0.1
Committed At 2018-03-23 10:59:37 UTC
elm-lang/html 2.0.0 <= v < 3.0.0 2.0.0
elm-lang/core 5.1.1 <= v < 6.0.0 5.1.1



Elm file reader

WARNING: this package won't work in the upcoming Elm 0.19 and there probably will be no way to publish a package with this API, since it relies on event handler content attributes, which will be disallowed in the upcoming release.

But it will work with Elm 0.18.

This package is a simple way to use the FileReader api from Elm. It provides attributes that help handle the different events and read files and send them as messages to Elm.

To make a file input and get a message in Elm, this is all you have to do:

import FileReader

type Msg =
    FileSelected FileReader.File

Html.input (FileReader.fileInput FileReader.DataURL FileSelected) []


Look in the examples folder. Live version at