I am trying to upload software installation file (.exe) in my site.When I am trying to upload file like 5 mb or 10 mb, I don't get any error.But while trying to upload large file,size of 45/50mb,I am getting this error
(1/1) FatalThrowableError
Call to a member function getClientOriginalExtension() on null
I have changed my php.ini like this:
upload_max_filesize = 900M
Here is my file upload form
<form action="/upload" method="post" enctype="multipart/form-data">
Product name:
<br />
<input type="text" name="name" />
<br /><br />
Files :
<br />
<input type="file" name="pdf" multiple />
<br /><br />
<input type="submit" value="Upload" />
</form>
Here is my controller:
public function google(Request $request){
$file = $request->file('pdf');
$destinationPath = 'uploads';
$file->move($destinationPath,$file->getClientOriginalName());
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire