{"id":23788600,"url":"https://github.com/krosscode/form-data-size-calculator","last_synced_at":"2025-08-08T16:15:40.640Z","repository":{"id":116957896,"uuid":"184573682","full_name":"krosscode/form-data-size-calculator","owner":"krosscode","description":"A script for calculating the size of a forms data. Primarily for comparison with PHP's post_max_size.","archived":false,"fork":false,"pushed_at":"2019-05-02T12:44:01.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-01T16:37:10.683Z","etag":null,"topics":["html","javascript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/krosscode.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":"2019-05-02T12:04:21.000Z","updated_at":"2019-06-14T20:14:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"331b7615-b023-4194-b893-2f58eaa343a5","html_url":"https://github.com/krosscode/form-data-size-calculator","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/krosscode%2Fform-data-size-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krosscode%2Fform-data-size-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krosscode%2Fform-data-size-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krosscode%2Fform-data-size-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krosscode","download_url":"https://codeload.github.com/krosscode/form-data-size-calculator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240011156,"owners_count":19733650,"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":["html","javascript"],"created_at":"2025-01-01T16:32:39.244Z","updated_at":"2025-02-21T12:20:49.208Z","avatar_url":"https://github.com/krosscode.png","language":"JavaScript","readme":"# Form data size calculator\n\nThis script calculates the size of a forms data. The primary purpose is to make sure that a forms data is smaller than for example PHP's `post_max_size` or Apache's `LimitRequestBody`.\n\nIt works by generating a string that emulates php://input as closely as possible.\n\n## Installation\n\n```html\n\u003c!-- Form data size calculator --\u003e\n\u003cscript src=\"https://raw.githubusercontent.com/krosscode/form-data-size-calculator/master/form-data-size-calculator.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\n**HTML**\n\n```html\n\u003cform id=\"form\" method=\"post\"\u003e\n\t\u003cinput name=\"input-1\" type=\"text\"\u003e\n\u003c/form\u003e\n```\n\n**JS**\n\n```javascript\nvar form = document.getElementById('form');\nvar formDataSize = calculateFormDataSize(form);\n```\n\n## Support\n\nThis does not work with `enctype=\"multipart/form-data\"` as I couldn't find a way to replicate the raw post data when it is active.\n\nCurrently these input types are supported:\n\n- button\n- checkbox\n- color\n- date\n- datetime-local\n- email\n- hidden\n- month\n- number\n- password\n- radio\n- range\n- search\n- select\n- submit\n- tel\n- text\n- textarea\n- time\n- url\n- week\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrosscode%2Fform-data-size-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrosscode%2Fform-data-size-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrosscode%2Fform-data-size-calculator/lists"}