limoncello-php / app

Quick start JSON API application
MIT License
83 stars 7 forks source link

processing images upload and validation #36

Open dreamsbond opened 6 years ago

dreamsbond commented 6 years ago

is there any place we would handle the images upload and validation via move_uploaded_file()?

dreamsbond commented 6 years ago

a standardize place, via WebRoute Controller?

neomerx commented 6 years ago

That's standard for PSR7. I think you should have a look at the spec here and here for a method moveTo.

dreamsbond commented 6 years ago

thanks. so the processing upload file will still be better implemented in ApiRoute Controllers, right?

neomerx commented 6 years ago

Yes, you start handling the $request in a controller. Whether you fully handle it in the controller making it fat or split the logic with API level would be your application design choice.