public function doUpload()
{
$mimes = $this->getOption('mimes') ? '|mimes:' . $this->getOption('mimes') : '';
//use the multup library to perform the upload
$result = Multup::open('file', 'max:' . $this->getOption('size_limit') * 1000 . $mimes, $this->getOption('location'), $this->getOption('naming') === 'random')->set_length($this->getOption('length'))->upload();
return $result[0];
}