I am working on a simple S3 image uploader in Elm. I’d like to name the uploaded file by a prefix of its SHA1 sum, as a primitive deduplication effort and also to supply a reasonable unique name for the file.
I use an ordinary
input[type="file"] to get the file, which means I receive a
File type back. How do I compute a SHA1 of that? I tried TSFoster/elm-sha1, but that needs the data as
List Int, whereas
File.toBytes gets me