Add file serialization support to the `form` component / `use_form_data` hook
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 15
- Forks
- 9
- Merge medio
- 9 h 57 min
- PR fusionados (30 d)
- 2
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de reactive-python/reactpy-router
-
complexity: 0 (highest) priority: 1 (high) type: feature
reactive-python/reactpy-router#32 · 1 asignado ·
-
complexity: 2 (medium) priority: 3 (low) type: feature
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Todos los issues de reactive-python/reactpy-router
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
canonical/paas-charm#368 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
tech debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
addition to tracking list Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
StevenBlack/hosts#3256 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
qualcomm/qai-appbuilder#275 ·