Issue
I am getting this error when uploading a pdf file, any ideas?:
RuntimeException stream_socket_sendto(): A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied
form in view:
<form action="{{ route('press-files.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<input type="file" name="pressFiles[]" multiple="multiple">
<button type="submit" class="btn btn-primary start">
<i class="pe-upload"></i>
<span>Start upload</span>
</form>
Controller:
public function store(Request $request)
{
$press_files = $request->all();
dd($press_files);
}
this is only happening on .pdf files - png's and jpegs all work.
Thanks for any help in advance
Solution
It turned out to be due to file size. I will keep this question and answer incase anybody else requires it.
The .pdf I was using was 2.8 MB and this failed, I used a much smaller file ~125kb and this worked fine.
Answered By - CodeBoyCode
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.