I have been trying to implement a dropzone file upload module with Laravel 5.
The problem is that when a file is uploaded dropzone sends the full request to the file upload controller, however, the controller does not get any data.
What am I missing? I have included the code I'm using. Thanks in advance for your time/help.
The view
{!! Form::open( array( 'url' => 'admin/file/upload', "id"=>"file-upload-modal", 'class'=>"dropzone" ) ) !!}
{!! Form::close() !!}
Controller
public function upload(FileUploadRequest $request){
//addeed this line for testing. //returns request array with an empty data set.
return response()->json($request);
if($request->hasFile('file')){
$request->file('file')->move('images');
}
}
It returns a 200 status code and dropzone thinks the file gets uploaded. However the response is actually an empty data set response:
{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}