I have my route:
Route::get('/file', array(
'as' => 'files',
'uses' => 'fileController@getFileUpload'
));
Route::post('/uploadfile', array(
'as' => 'uploadfile',
'uses' => 'fileController@postfileupload'
));
Now i have uploadifive setup on my /file route and sending post request to /uploadfile
code for uploadfile is here:
$file = Input::file('file_upload');
$destinationPath = 'files/CDN/'.str_random(8);
echo $filename = $file->getClientOriginalName();
$extension =$file->getClientOriginalExtension();
$uploadSuccess = Input::file('file')->move($destinationPath, $filename);
but always i am getting 500 (Internal Server Error)
I checked my directory CHMOD is 0777 and i am linking to right route as when i remove above code from /uploadfile and place
echo 200;
it returns success.
I have tried adding blade form tag also but uploadifive actually does not depends upon form element at all. It post with AJAX.