FileNotFound exception should say at path...
Can you include the top 10 lines from the stack trace
Is it the size of the file that is causing the issue?
Do you have enough free disk space?
I have been using the same code for a couple of years but today I have run into a problem. When I try and upload a pdf, I get the error:
FileNotFoundException in Filesystem.php line 36:
public function store(CreateFilesRequest $request)
{
$files = Request::file('filefield');
$file_count = count($files);
$uploadcount = 0;
foreach ($files as $file) {
// $upload = Request::all();
$upload = new Files($request->all());
// start count how many uploaded
$clientID = "";
$dcmid = "";
$account = "";
if ($upload['file_category'] == 'statement') {
$name = $file->getClientOriginalName();
list($name_init, $clientID, $initial, $account,$pdf_date) = explode('_', $name);
$len = strlen($account);
$dcmid = substr($account,0,$len-2);
}
// return $clientID;
$extension = $file->getClientOriginalExtension();
Storage::disk('local')->put($file->getFilename().'.'.$extension, File::get($file));
$upload->mime = $file->getClientMimeType();
$upload->original_filename = $file->getClientOriginalName();
$upload->filename = $file->getFilename().'.'.$extension;
// dd(Auth::user()->id);
$upload->user_id = Auth::user()->id;
$upload->clientID = $clientID;
$upload->dcmid = $dcmid;
$upload->accountNo = $account;
$upload->save();
$uploadcount ++;
}
if($uploadcount == $file_count){
flash()->success('Successfully uploaded '.$uploadcount. ' files');
return redirect('uploads');
}
else {
return Redirect::to('uploads')->withInput()->withErrors($validator);
}
}
Please or to participate in this conversation.