{"id":19667260,"url":"https://github.com/willnet/upload-file-with-security","last_synced_at":"2025-04-28T23:32:15.993Z","repository":{"id":39396136,"uuid":"206764204","full_name":"willnet/upload-file-with-security","owner":"willnet","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-19T14:42:28.000Z","size":1472,"stargazers_count":0,"open_issues_count":35,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-04-10T16:14:40.745Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/willnet.png","metadata":{"files":{"readme":"README.md","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":"2019-09-06T09:49:38.000Z","updated_at":"2019-10-25T07:04:13.000Z","dependencies_parsed_at":"2023-02-11T05:00:21.241Z","dependency_job_id":null,"html_url":"https://github.com/willnet/upload-file-with-security","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/willnet%2Fupload-file-with-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willnet%2Fupload-file-with-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willnet%2Fupload-file-with-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willnet%2Fupload-file-with-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willnet","download_url":"https://codeload.github.com/willnet/upload-file-with-security/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224137376,"owners_count":17262004,"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":[],"created_at":"2024-11-11T16:31:25.285Z","updated_at":"2024-11-11T16:31:50.615Z","avatar_url":"https://github.com/willnet.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Upload file with security\n\nshrineを使ったサンプルRailsアプリです\n\n## セットアップ方法\n\nmac前提\n\n```\nbrew install libvips\n./bin/setup\n```\n\n## 構成\n\n- scaffoldでUserとSecretモデルを作っています\n  - それぞれ http://localhost:3000/users , http://localhost:3000/secrets でCRUDできます\n- それぞれShrineでファイルアップロードできるようにしています\n- Userは普通にon the flyでのファイル変換\n- Secretもon the flyのファイル変換ですが、以下の点で異なります\n  - SecureDerivationsController#showでアクセス制限をする余地を作っています\n  - ファイルのパスにモデル名とIDを含めているので、そこから「アップロードしたファイルにアクセスする権限があるか否か」をチェック可能\n  - 要求された形式のファイルがストレージにない場合は、変換後ストレージに保存し次回はそれを使用する形式になっています\n    - CDNをつかわない前提\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillnet%2Fupload-file-with-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillnet%2Fupload-file-with-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillnet%2Fupload-file-with-security/lists"}