{"id":32114233,"url":"https://github.com/robotmay/s3-direct-file-upload","last_synced_at":"2026-02-18T20:31:56.189Z","repository":{"id":52757984,"uuid":"221562423","full_name":"robotmay/s3-direct-file-upload","owner":"robotmay","description":"Elm S3/Shrine direct file uploader","archived":false,"fork":false,"pushed_at":"2021-04-19T21:19:33.000Z","size":5,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-23T18:06:32.594Z","etag":null,"topics":["elm"],"latest_commit_sha":null,"homepage":null,"language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robotmay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-13T22:19:26.000Z","updated_at":"2021-11-21T09:49:22.000Z","dependencies_parsed_at":"2022-08-22T19:21:05.752Z","dependency_job_id":null,"html_url":"https://github.com/robotmay/s3-direct-file-upload","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/robotmay/s3-direct-file-upload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotmay%2Fs3-direct-file-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotmay%2Fs3-direct-file-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotmay%2Fs3-direct-file-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotmay%2Fs3-direct-file-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robotmay","download_url":"https://codeload.github.com/robotmay/s3-direct-file-upload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotmay%2Fs3-direct-file-upload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29594259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T18:54:29.675Z","status":"ssl_error","status_checked_at":"2026-02-18T18:50:50.517Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elm"],"created_at":"2025-10-20T15:14:23.432Z","updated_at":"2026-02-18T20:31:56.170Z","avatar_url":"https://github.com/robotmay.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# S3 Direct File Uploads in Elm\n\nThis is a simple library that allows you to upload files directly to Amazon S3 (or compatible services, except Digital Ocean Spaces which will rate limit you immediately).\n\n## Usage\n\nI've basically ripped this out of the [Senryu.pub](https://senryu.pub) editor for the moment, so documentation is\na bit thin on the ground, however the following code should be most of what is needed to get it working.\n\n```elm\n  -- Import this library\n  import S3DirectFileUpload exposing (FileUpload)\n\n  -- Other dependencies for the example code below\n  import File exposing (File)\n  import File.Select as Select\n  import Html.Events exposing (onClick)\n  import Task\n\n  -- Example upload button in the view:\n  uploadButton : Model -\u003e Html Message\n  uploadButton model =\n    a [ class \"btn\", onClick Pick ]\n      [ text \"Upload images\" ]\n\n\n  update : Message -\u003e Model -\u003e (Model, Cmd Message)\n  update message model =\n    Pick -\u003e\n      ( model\n      , Select.files [\"image/*\"] GotFiles\n      )\n\n    GotFiles file files -\u003e\n      let\n        allFiles = (file :: files)\n\n        commands =\n          List.map\n            (\\file_ -\u003e\n              -- \"media/sign\" here is the endpoint on the application which generates some needed\n              -- params for this to work. Shrine defaults to \"/s3/params\" when mounted, but you\n              -- need it without the preceding / here, e.g. \"s3/params\"\n              Task.attempt GotFileUpload (FileUpload.upload file_ \"media/sign\")\n            )\n            allFiles\n\n      in\n        ( model\n        , Cmd.batch commands\n        )\n\n    GotFileUpload fileUpload -\u003e\n      case fileUpload of\n        Err err -\u003e\n          -- Most likely a HTTP error\n          -- Do something with the error, e.g.\n          ( { model | state = Broken }, Cmd.none )\n        Ok data -\u003e\n          -- Do something with the returned FileUpload type, e.g.\n          saveToServer data\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotmay%2Fs3-direct-file-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobotmay%2Fs3-direct-file-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotmay%2Fs3-direct-file-upload/lists"}