I am sendign multiple input to laravel thorugh jquery ajax request.
here is my script
jqyery script:
var album_file=document.getElementById("upload_file").files;//getting multiple images
var albumname = document.getElementById('albumname').value;//albumname
console.log(album_file);
$.get('/photoalbum/?albumdetail='+album_file+'&albumname='+albumname,function(data){
console.log(data);
});
On onclick of upload bitton script executes and i m getting below data on console of album file
FileList {0: File, 1: File, length: 2}
length:2
0:File
lastModified:1489731759920
lastModifiedDate:Fri Mar 17 2017 11:52:39 GMT+0530 (India Standard Time)
name:"1.png"
size:117627
type:"image/png"
webkitRelativePath:""
__proto__:
File
1:File
while in laravel controller on i m receving the request, In below form
public function storealbum(Request $request)
{
print_r($request::all());
}
and it printing :
Array ( [albumdetail] => [object FileList] [albumname] => tet )
What I want that instead of [object FileList] i want all my file object.
Where I am making mistake.