Provide pathname of uploaded file

This commit is contained in:
Nero 2019-08-16 10:26:37 +00:00
parent c4496dd920
commit 8843c26153
1 changed files with 5 additions and 0 deletions

View File

@ -10,4 +10,9 @@ class FileUpload extends FormField {
$this->value=$_FILES[$name]['name'];
$this->file=$_FILES[$name]['tmp_name'];
}
public function getTmpPath() {
if ($this->error > 0) throw new UploadException("Upload failure", $this->error);
return $this->file;
}
}