php - Upload files in Symfony without Doctrine -


in symfony controller can:

$file = $request->files->get('file'); 

if don't have problems, if uploads return errors?

for example if send large file $file null, if use clear php:

$_files['file']['error'] 

then have error. good, how can in symfony?

$request->files->get('file')->geterror(); 

it not working because $request->files->get('file') null.

is possible handle errors $request->files in symfony?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -