I want to upload a big file and I get TokenMismatchException it works on small files and I DID add csrf_field but it still gives me this error.
I changed the upload_max_filesize
post_max_size
and I reset wamp but I get this error.
form:
<form action="/upload" method="post" enctype="multipart/form-data">
{{ csrf_field()}}
<input type="file" name="file">
<button type="submit">send</button>
</form>
controller:
public function index2(Request $request){
$file=$request->file('file');
$file->move('test','test.zip');
return 'done';
}
if you upload more then your server's post_max_size setting the input will be empty, hence a token miss-match so if you have 2 upload input's in your form and your upload_max_filesize is 2G, your post_max_size needs to be at least 4G