public function uploadFile()
{
if ($this->validate()) {
$path ='upload/store/' . $this->file->baseName.'.'.$this->file->extension;
$this->file->saveAs($path);
$this->attachImage($path);
@unlink($path);
return true;
} else {
return false;
}
}