✨ (pagetop): Añade subida y descarga de archivos
- `web::Upload` guarda los archivos de un envío multipart en disco por trozos, con nombre aleatorio, extensiones y tamaño máximo por archivo. `receive()` deserializa además los campos de texto con serde_qs. - `web::Download` sirve un archivo subido con rangos y peticiones condicionales, inline sólo para tipos pasivos y con nosniff. - `form::File`, componente para elegir archivos, y soporte en Bootsier. - Límite del cuerpo según el tipo de contenido: `server.max_body_size` baja a 2 MiB y el nuevo `upload.max_request_size` (32 MiB) se aplica sólo a multipart/form-data.
This commit is contained in:
parent
5540c0c6a0
commit
f3228d6b59
21 changed files with 2240 additions and 17 deletions
|
|
@ -66,3 +66,16 @@ poweredby_pagetop = Powered by { $pagetop_link }
|
|||
|
||||
# Table component.
|
||||
table_empty = No data to display
|
||||
|
||||
# File uploads (web::Upload and web::Download).
|
||||
upload_too_large = "{ $file }" exceeds the maximum size of { $size } per file.
|
||||
upload_extension_not_allowed = "{ $file }" is not an allowed file type ({ $allowed }).
|
||||
upload_too_many_files = { $limit ->
|
||||
[one] Only one file can be sent at a time.
|
||||
*[other] Only { $limit } files can be sent at a time.
|
||||
}
|
||||
upload_fields_too_large = The form fields exceed the maximum size of { $size }.
|
||||
upload_body_too_large = The submission exceeds the maximum size of { $size }.
|
||||
upload_not_found = The file does not exist or is no longer available.
|
||||
upload_invalid = The form submission is not valid. Please try again.
|
||||
upload_failed = The file could not be processed. Please try again later.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue