public function confirmUpload() : self { // Isset is just a simple check, it is not sufficient! $this->success = isset($_FILES[$this->index]); return $this; }
/** * Sets that the file fas successfully uploaded. * * @param \Jyxo\Input\Upload $in Uploaded file * @return \Jyxo\Input\Upload */ public function filter($in) { if (!$this->error && !$this->failedEmpty) { $in->confirmUpload(); } return $in; }