Add file serialization support to the `form` component / `use_form_data` hook
まだ誰も着手していません。
評価
調査の方向性
Start with the form component and use_form_data hook, using PR #58 and the original feature in #7 for context. Resolve whether file fields use metadata, multipart upload, or both before implementing. Done means mixed file and regular fields serialize without a reload, the behavior is tested, and documentation is updated.
索引モデルが issue の本文から書いたものです。
説明
Description
Follow-up to #58 (the form component and use_form_data hook, which closed #7).
The form component's client-side interception currently serializes non-file fields only. File inputs (<input type="file">) are silently excluded because the submission handler iterates FormData entries and calls .toString() on each value, which for File objects yields [object File] and loses the file content.
The PR description for #58 explicitly deferred this:
Non-file fields only; file serialization is deferred.
Proposed scope
Support forms that contain file inputs, matching how the current behavior treats other input types. Possible options to evaluate:
- Include file metadata (name, size, type, lastModified) in the serialized form data, without uploading file content — useful for validation/UI feedback on the server.
- Defer file content upload to a separate multipart
POSTwhen the form is submitted, integrating with the router's navigation model. - Combination: send metadata for a GET-style/
pushStatenavigation while supporting an optional file payload.
Acceptance criteria
- Defining a form with one or more
<input type="file">fields does not break serialization of the other fields. - File fields are represented in the
use_form_data()output in a well-defined way (currently undocumented behavior). - No full page reload occurs on submit of a form with file inputs (consistent with #58).
- A test covers a form that mixes file inputs with regular fields.
- Documentation updated for file-field behaviour.
Related
- PR: #58
- Original feature: #7
- 主要言語
- Python
- スター
- 15
- フォーク
- 9
- 平均マージ
- 9時間 57分
- マージ済み PR(30日)
- 2
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
reactive-python/reactpy-router のほかの issue
-
complexity: 0 (highest) priority: 1 (high) type: feature
reactive-python/reactpy-router#32 · 担当者 1 名 ·
-
complexity: 2 (medium) priority: 3 (low) type: feature
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
reactive-python/reactpy-router の issue をすべて見る
似ている issue
-
essnmx good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
[Feature] 奇物选择添加优先级 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
syfoud/Simulated_Scepter#174 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Giskard-AI/giskard-oss#2840 · コメント 1 件 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success オープンarea: repo bug perceived difficulty: 2
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yeti-platform/yeti#1380 ·