This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
elm-s3 is a pure Elm client library for Amazon S3 and Digital Ocean Spaces.
version 1.0.0
license MIT
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.0.0
Committed At 2017-12-03 04:05:28 UTC
ktonon/elm-aws-core 1.1.0 <= v < 2.0.0 1.1.0
elm-lang/http 1.0.0 <= v < 2.0.0 1.0.0
elm-lang/core 5.1.1 <= v < 6.0.0 5.1.1
billstclair/elm-xml-extra 2.1.0 <= v < 3.0.0 2.1.0

Modules

README

elm-package

Pure-Elm client for Amazon S3 and DigitalOcean Spaces key/value stores. It targets a subset of the DigitalOcean subset of the Amazon S3 API.

Example

The example directory has some sample code, with a simple user interface.

Cross-Origin Resource Sharing (CORS)

It's very easy to get CORS errors when doing S3 requests from a web browser. You can't list buckets at all, and you need to set the CORS properties on buckets, with some tool other than a browser, in order to be able to access them from a browser.

cors.xml is an example of XML to send as the body in an s3cmd "setcors" command:

s3cmd setcors cors.xml s3://BUCKET

For Amazon S3, you can use the AWS Management Console to set the CORS properties. For Digital Ocean Spaces, you need to do it with an SDK or s3cmd. The Amazon S3 CORS documentation is here.

Credits

My thanks to Kevin Tonon for his ktonen/elm-aws-core package. Without it, I would likely have thrown up my hands in despair over ever getting the signing and authorization crypto to work.