{"id":21084092,"url":"https://github.com/meysammahfouzi/put-form-data","last_synced_at":"2026-04-27T15:34:36.955Z","repository":{"id":220232941,"uuid":"149159735","full_name":"meysammahfouzi/put-form-data","owner":"meysammahfouzi","description":"In php, form data is available only in POST method. This OctoberCMS plugin makes them available in other methods like PUT and PATCH","archived":false,"fork":false,"pushed_at":"2019-07-14T05:32:40.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-01T16:32:29.640Z","etag":null,"topics":["laravel","octobercms","octobercms-plugin","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meysammahfouzi.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":"2018-09-17T17:05:49.000Z","updated_at":"2023-08-24T12:48:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"7171efb3-ab40-4586-bed1-9ea7e93c8531","html_url":"https://github.com/meysammahfouzi/put-form-data","commit_stats":null,"previous_names":["meysammahfouzi/put-form-data"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meysammahfouzi/put-form-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysammahfouzi%2Fput-form-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysammahfouzi%2Fput-form-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysammahfouzi%2Fput-form-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysammahfouzi%2Fput-form-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meysammahfouzi","download_url":"https://codeload.github.com/meysammahfouzi/put-form-data/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysammahfouzi%2Fput-form-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32343559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["laravel","octobercms","octobercms-plugin","php"],"created_at":"2024-11-19T20:22:00.752Z","updated_at":"2026-04-27T15:34:36.907Z","avatar_url":"https://github.com/meysammahfouzi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\nThere is a bug in php which has been described [here:](https://bugs.php.net/bug.php?id=55815)\n\nData that is posted to PHP via the PUT method is not parsed at all and is not \navailable to PHP.\nThis is particularly problematic for data sent encoded as 'multipart/form-data'.\n\nBasically, a request sent (with files and/or non-file data) via PUT should be \nparsed using the same functions used for requests sent via POST.\n\nThis is an [OctoberCMS](https://github.com/octobercms/october) plugin which fixes this problem. \n\n# The Problem\nSuppose you are calling a REST API which accepts two parameters: `title` and `photo`.  \nThis API must be called via `PUT` method to update a resource.  \nIn your javascript code, you encode the title and photo as `multipart/form-data` and send the `PUT` request.  \nOn the server side though, because of the above PHP bug, trying to access the uploaded file or accessing the title field\nwill fail. In other words, all of the following will either return false or null:  \n\n- Input::has('title')\n- Input::get('title')\n- Input::hasFile('photo') \n- Input::file('photo')\n\n# Solution\nBy simply installing this plugin, the `form-data` become available in your `PUT` and `PATCH` requests exactly as they \nappear in `POST` requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeysammahfouzi%2Fput-form-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeysammahfouzi%2Fput-form-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeysammahfouzi%2Fput-form-data/lists"}