{"id":20509069,"url":"https://github.com/abeluck/mod_http_upload_s3","last_synced_at":"2025-05-09T07:31:54.617Z","repository":{"id":55063811,"uuid":"149286825","full_name":"abeluck/mod_http_upload_s3","owner":"abeluck","description":"prosody module for HTTP File Upload (XEP-0363) to AWS S3","archived":false,"fork":false,"pushed_at":"2018-09-20T12:50:19.000Z","size":4,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-03-24T03:35:00.080Z","etag":null,"topics":["lua","prosody-module"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abeluck.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-18T12:45:21.000Z","updated_at":"2022-09-12T19:50:56.000Z","dependencies_parsed_at":"2022-08-14T10:50:11.250Z","dependency_job_id":null,"html_url":"https://github.com/abeluck/mod_http_upload_s3","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeluck%2Fmod_http_upload_s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeluck%2Fmod_http_upload_s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeluck%2Fmod_http_upload_s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeluck%2Fmod_http_upload_s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abeluck","download_url":"https://codeload.github.com/abeluck/mod_http_upload_s3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224840050,"owners_count":17378535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["lua","prosody-module"],"created_at":"2024-11-15T20:22:19.465Z","updated_at":"2024-11-15T20:22:20.745Z","avatar_url":"https://github.com/abeluck.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ndescription: HTTP File Upload (Amazon AWS S3)\nlabels: 'Stage-Alpha'\n---\n\nIntroduction\n============\n\nThis module implements [XEP-0363](https://xmpp.org/extensions/xep-0363.html),\nwhich lets clients upload files over HTTP directly to an Amazon AWS S3 bucket.\nNo extra server-side code is required.\n\nThis module generates URLs that are signed using [AWS Signature Version\n4](https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html)\nto upload to S3. To download/GET files, the S3 bucket must be made public. A\nrandom UUID is used in the URL for each uploaded file to prevent filename\ncollisions.\n\nS3 Configuration\n================\n\n1. Choose an AWS region to store your files, note the region id\n   for this example we choose `eu-west-2`\n2. Create the bucket in [the S3 console](https://s3.console.aws.amazon.com/s3/buckets/)\n   for this example we choose `the_best_bucket`\n3. Choose a path inside the root of the bucket uploads should land in\n   for this example we choose `http_uploads`\n4. Create a Bucket Policy (Bucket \u003e Permissions \u003e Bucket Policy) that marks all objects in this path as public:\n```{.json}\n{\n  \"Id\": \"Policy153727464300\",\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"Stmt153727464300\",\n      \"Action\": [\n        \"s3:GetObject\"\n      ],\n      \"Effect\": \"Allow\",\n      \"Resource\": \"arn:aws:s3:::the_best_bucket/http_uploads/*\",\n      \"Principal\": \"*\"\n    }\n  ]\n}\n```\n\n\nProsody Configuration\n=====================\n\nAdd `\"http_upload_s3\"` to `modules_enabled` in your global section, or under the host(s) you wish\nto use it on.\n\n``` {.lua}\n\n--  Your AWS access key id\nhttp_upload_s3_access_id = \"AKTESTKEY\";\n\n--  Your AWS secret access key\nhttp_upload_s3_secret_key = \"YUNOCHANGEDMEKEY\";\n\n-- The region your bucket is located in\nhttp_upload_s3_region = \"eu-west-2\";\n\n-- The full name of your bucket\nhttp_upload_s3_bucket = \"the_best_bucket\";\n\n-- The directory under the bucket root to store files in\nhttp_upload_s3_path  = \"http_uploads\";\n\n-- A maximum file size can be set by:\n--  default: 100MB (100\\*1024\\*1024)\nhttp_upload_s3_file_size_limit = 123 -- bytes\n```\n\n\nCompatibility\n=============\n\nWorks with Prosody 0.10.x and later.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeluck%2Fmod_http_upload_s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabeluck%2Fmod_http_upload_s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeluck%2Fmod_http_upload_s3/lists"}