You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When uploading multiple files in a single field (e.g., images[]), params.files currently only captures the last file, overwriting any previous files in the array. This behavior limits support for multi-file uploads, as only a single Kemal::FileUpload object is returned instead of an array of uploaded files.
Expected Behavior
The params.files method should recognize and return all files in the field as an array of Kemal::FileUpload objects, allowing for multiple file uploads in one request.
Potential Solutions
New Method: Introduce a new method, such as params.all_files, specifically for handling multiple file uploads and returning an array of Kemal::FileUpload objects. This approach avoids breaking existing functionality.
Breaking Change: Modify params.files directly to support an array of Kemal::FileUpload objects, introducing a breaking change but aligning the method with multi-file upload expectations.
Impact
Updating this behavior will enhance file handling capabilities in Kemal and align it more closely with common file upload workflows, especially useful for forms that allow multiple file selections.
When uploading multiple files in a single field (e.g., images[]),
params.files
currently only captures the last file, overwriting any previous files in the array. This behavior limits support for multi-file uploads, as only a singleKemal::FileUpload
object is returned instead of an array of uploaded files.Expected Behavior
The
params.files
method should recognize and return all files in the field as an array of Kemal::FileUpload objects, allowing for multiple file uploads in one request.Potential Solutions
params.all_files
, specifically for handling multiple file uploads and returning an array ofKemal::FileUpload
objects. This approach avoids breaking existing functionality.params.files
directly to support an array ofKemal::FileUpload
objects, introducing a breaking change but aligning the method with multi-file upload expectations.Impact
Updating this behavior will enhance file handling capabilities in Kemal and align it more closely with common file upload workflows, especially useful for forms that allow multiple file selections.
WDYT @straight-shoota
The text was updated successfully, but these errors were encountered: