Repository navigation
feat(multipart): demonstrate optional text fields and missing files - #1509
Merged
Merged
Conversation
AI-assisted: DSH Signed-off-by: NginxL <8777777+NginxL@users.noreply.github.com>
robjtede
approved these changes
Dec 6, 2026
robjtede
marked this pull request as ready for review
December 6, 2026 14:58
robjtede
enabled auto-merge
December 6, 2026 14:58
robjtede
disabled auto-merge
December 6, 2026 14:58
robjtede
enabled auto-merge
December 6, 2026 14:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #410.
Extends the multipart example to demonstrate both parts of the question:
files: Vec<TempFile>andform.files.is_empty()show whether any file parts were submitted.pub_time: Option<Text<String>>shows how to read an optional text field alongside files.pub_time, and the README has acurlexample with repeatedfilefields.No new dependencies were added;
Textis part of the existingactix-multipartdependency.Validation
rustfmt --edition 2024 --check forms/multipart/src/main.rs.git diff --check.Option<Text<String>>andVec<TempFile>against the actix-multipart 0.8MultipartFormdocumentation for optional/list fields and text fields.Gaps
cargo build/cargo testwas not run because crate sources were absent from the local Cargo registry and dependency downloads were prohibited. Upstream CI should compile the example.AI disclosure
This example update was prepared with AI assistance (DSH). The extractor types were checked against the actix-multipart 0.8 API documentation.