Saturday, 5 October 2013

Multiple File Upload :Laravel4










Issues and their resolutions with multiple file load

  1. var_dump( Input::file("file_field") ) == NULL, for multiple file uploading but works fine for one file.
    1. Check if you have max_upload_file and max_post_size set very low in php.ini file
  2. Input::file("file_field") is giving only one file object.
    1. Verify that you have  file filed set with name attribute containing brackets . eg. Form::file("file_name[]") .
  3. If you're doing some image processing you then might need to extend memory_limit.
    ini_set('memory_limit', '64M'); >> Set it to ini_set('memory_limit', -1)     
log.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Allowed memory size of 134217728 bytes exhausted (tried to allocate 1xxxxxx bytes)' in ...\vendor\filp\whoops\src\Whoops\Handler\PrettyPageHandler.php:123
Stack trace:
Error  Say's that you need to increase memory for your application. Where? In php.ini file.
If you don't have access? then increase dynamically using ini_set()

     4.  Consult your laravel log file if you face any other error . Log file you may find inside storage/log folder.
eg. path/to/your/application/app/storage/logs





No comments:

Post a Comment