{"id":15018057,"url":"https://github.com/magiclen/rocket-multipart-form-data","last_synced_at":"2026-02-23T09:38:25.275Z","repository":{"id":45756917,"uuid":"154015658","full_name":"magiclen/rocket-multipart-form-data","owner":"magiclen","description":"This crate provides a multipart parser for the Rocket framework.","archived":false,"fork":false,"pushed_at":"2023-11-03T02:32:21.000Z","size":71,"stargazers_count":35,"open_issues_count":4,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T17:51:35.234Z","etag":null,"topics":["multipart-formdata","rocket","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/magiclen.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-10-21T14:12:33.000Z","updated_at":"2022-11-06T13:43:24.000Z","dependencies_parsed_at":"2024-09-16T12:32:26.754Z","dependency_job_id":"c316a2ca-b7da-482a-9a3e-8e69277a5abd","html_url":"https://github.com/magiclen/rocket-multipart-form-data","commit_stats":{"total_commits":51,"total_committers":3,"mean_commits":17.0,"dds":"0.039215686274509776","last_synced_commit":"4e8dc22acfe0341d8871292b955ead88ea93e9bf"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/magiclen/rocket-multipart-form-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Frocket-multipart-form-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Frocket-multipart-form-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Frocket-multipart-form-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Frocket-multipart-form-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magiclen","download_url":"https://codeload.github.com/magiclen/rocket-multipart-form-data/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Frocket-multipart-form-data/sbom","scorecard":{"id":611821,"data":{"date":"2025-08-11","repo":{"name":"github.com/magiclen/rocket-multipart-form-data","commit":"efebd9915c7a6cbce1dae4fb0e94dc2142e8e5d1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-version.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci-version.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci-version.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci-version.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-version.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci-version.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci-version.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci-version.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/magiclen/rocket-multipart-form-data/ci.yml/master?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci-version.yml:1","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T02:50:53.830Z","repository_id":45756917,"created_at":"2025-08-21T02:50:53.831Z","updated_at":"2025-08-21T02:50:53.831Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29741140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["multipart-formdata","rocket","rust"],"created_at":"2024-09-24T19:51:22.715Z","updated_at":"2026-02-23T09:38:25.222Z","avatar_url":"https://github.com/magiclen.png","language":"Rust","readme":"Multipart Form Data for Rocket Framework\n====================\n\n[![CI](https://github.com/magiclen/rocket-multipart-form-data/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/rocket-multipart-form-data/actions/workflows/ci.yml)\n\nThis crate provides a multipart parser for the Rocket framework.\n\n## Example\n\n```rust\n#[macro_use] extern crate rocket;\n\nuse rocket::Data;\nuse rocket::http::ContentType;\n\nuse rocket_multipart_form_data::{mime, MultipartFormDataOptions, MultipartFormData, MultipartFormDataField, Repetition};\n\n#[post(\"/\", data = \"\u003cdata\u003e\")]\nasync fn index(content_type: \u0026ContentType, data: Data\u003c'_\u003e) -\u003e \u0026'static str {\n    let mut options = MultipartFormDataOptions::with_multipart_form_data_fields(\n        vec! [\n            MultipartFormDataField::file(\"photo\").content_type_by_string(Some(mime::IMAGE_STAR)).unwrap(),\n            MultipartFormDataField::raw(\"fingerprint\").size_limit(4096),\n            MultipartFormDataField::text(\"name\"),\n            MultipartFormDataField::text(\"email\").repetition(Repetition::fixed(3)),\n            MultipartFormDataField::text(\"email\"),\n        ]\n    );\n\n    let mut multipart_form_data = MultipartFormData::parse(content_type, data, options).await.unwrap();\n\n    let photo = multipart_form_data.files.get(\"photo\"); // Use the get method to preserve file fields from moving out of the MultipartFormData instance in order to delete them automatically when the MultipartFormData instance is being dropped\n    let fingerprint = multipart_form_data.raw.remove(\"fingerprint\"); // Use the remove method to move raw fields out of the MultipartFormData instance (recommended)\n    let name = multipart_form_data.texts.remove(\"name\"); // Use the remove method to move text fields out of the MultipartFormData instance (recommended)\n    let email = multipart_form_data.texts.remove(\"email\");\n\n    if let Some(file_fields) = photo {\n        let file_field = \u0026file_fields[0]; // Because we only put one \"photo\" field to the allowed_fields, the max length of this file_fields is 1.\n\n        let _content_type = \u0026file_field.content_type;\n        let _file_name = \u0026file_field.file_name;\n        let _path = \u0026file_field.path;\n\n        // You can now deal with the uploaded file.\n    }\n\n    if let Some(mut raw_fields) = fingerprint {\n        let raw_field = raw_fields.remove(0); // Because we only put one \"fingerprint\" field to the allowed_fields, the max length of this raw_fields is 1.\n\n        let _content_type = raw_field.content_type;\n        let _file_name = raw_field.file_name;\n        let _raw = raw_field.raw;\n\n        // You can now deal with the raw data.\n    }\n\n    if let Some(mut text_fields) = name {\n        let text_field = text_fields.remove(0); // Because we only put one \"text\" field to the allowed_fields, the max length of this text_fields is 1.\n\n        let _content_type = text_field.content_type;\n        let _file_name = text_field.file_name;\n        let _text = text_field.text;\n\n        // You can now deal with the text data.\n    }\n\n    if let Some(text_fields) = email {\n        for text_field in text_fields { // We put \"email\" field to the allowed_fields for two times and let the first time repeat for 3 times, so the max length of this text_fields is 4.\n            let _content_type = text_field.content_type;\n            let _file_name = text_field.file_name;\n            let _text = text_field.text;\n\n            // You can now deal with the text data.\n        }\n    }\n\n    \"ok\"\n}\n```\n\nAlso see `examples`.\n\n## Crates.io\n\nhttps://crates.io/crates/rocket-multipart-form-data\n\n## Documentation\n\nhttps://docs.rs/rocket-multipart-form-data\n\n## License\n\n[MIT](LICENSE)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Frocket-multipart-form-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagiclen%2Frocket-multipart-form-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Frocket-multipart-form-data/lists"}