laravel - Input::get('file') return 'null' with PHP 5.6 -
i have upgraded php 5.6 5.4 , can't image extension because input::get('file') returns null. have not touched code, upgraded php.
i use laravel 4.2
$input = input::all(); $rules = array( 'file' => 'image|max:3000', ); $validation = validator::make($input, $rules); if ($validation->failed()) {/* return response::make($validation->errors->first(), 400);*/ return response::json(['error' => $validation->errors->first()]); } $image = input::file('file'); $filename = time() . '.' . $image->getclientoriginalextension(); $path = public_path('images/temp/' . $filename); image::make($image->getrealpath())->save($path); session::put('topiccover', $path); return response::json(['status' => 'success', 'filename' => $filename]);
i found out error occures after line "image::make($image->getrealpath())->save($path);" maybe because after xampp reinstallation not allow apache move files xampp\temp folder?
ok, found answer - have not enabled fileinfo extension after upgrading php. great facepalm...
Comments
Post a Comment