radiate-framework / framework

A WordPress plugin and theme framework
https://radiate-framework.github.io/
MIT License
4 stars 0 forks source link

Better `$_FILES` support #167

Open BenRutlandWeb opened 2 years ago

BenRutlandWeb commented 2 years ago

Is your feature request related to a problem? Please describe. The Request object doesn't handle files gracefully

Describe the solution you'd like A nice API to handle file uploads

Describe alternatives you've considered Using the $_FILES array

Additional context The WP_REST_Request has a get_file_params method and set_file_params method, but these don't format the files into a nice consistent array. Laravel/Symfony map files into a File or UploadedFile object which would allow for some cool fluent APIs to be performed such as store and storeAs.