{"id":26981157,"url":"https://github.com/acearchive/files-worker","last_synced_at":"2025-04-03T15:33:06.458Z","repository":{"id":117941648,"uuid":"544954859","full_name":"acearchive/files-worker","owner":"acearchive","description":"A serverless function which hosts artifact files for Ace Archive","archived":false,"fork":false,"pushed_at":"2025-02-27T07:31:40.000Z","size":814,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T10:19:40.393Z","etag":null,"topics":["cloudflare-workers","serverless"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"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/acearchive.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-03T14:27:31.000Z","updated_at":"2025-02-27T07:31:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8f21aa2-d6bf-4209-b528-f10e12a64ef9","html_url":"https://github.com/acearchive/files-worker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acearchive%2Ffiles-worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acearchive%2Ffiles-worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acearchive%2Ffiles-worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acearchive%2Ffiles-worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acearchive","download_url":"https://codeload.github.com/acearchive/files-worker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247028295,"owners_count":20871673,"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":["cloudflare-workers","serverless"],"created_at":"2025-04-03T15:33:05.918Z","updated_at":"2025-04-03T15:33:06.446Z","avatar_url":"https://github.com/acearchive.png","language":"TypeScript","readme":"# files-worker\n\nThis repo is a [Cloudflare Worker](https://developers.cloudflare.com/workers/)\nthat serves artifact files hosted on Ace Archive from [Cloudflare\nR2](https://developers.cloudflare.com/r2).\n\nArtifact metadata is stored in a [Cloudflare\nD1](https://developers.cloudflare.com/d1) SQLite database. This worker handles\nincoming `GET` and `HEAD` requests to `https://files.acearchive.lgbt`, reads the\nmetadata for the artifact from the database, and then serves the file contents\nfrom R2.\n\nThis worker handles requests of the form:\n\n```\nhttps://files.acearchive.lgbt/artifacts/\u003cartifact_slug\u003e/\u003cfile_name\u003e\n```\n\nThe artifact metadata in the database is populated by\n[acearchive/artifact-submit-action](https://github.com/acearchive/artifact-submit-action).\nRequesting this metadata in this worker is necessary because objects in R2 are\nkeyed by their hash (more specifically a\n[multihash](https://multiformats.io/multihash/)), so we need to get the hash of\nthe file first.\n\nHTTP range requests and conditional requests are supported, and `ETag` and\n`Last-Modified` headers are returned for caching.\n\nR2 [bucket locks](https://developers.cloudflare.com/r2/buckets/bucket-locks/)\nare used to ensure that files written to R2 cannot be overwritten or deleted.\nHowever, the Cloudflare [Terraform\nprovider](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs)\ndoes not seem to support this API as of time of writing, so this step was taken\nmanually.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facearchive%2Ffiles-worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facearchive%2Ffiles-worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facearchive%2Ffiles-worker/lists"}