public function mediaUpload($fileName = 'file', $useFile = false)
    {
        $file = UploadedFile::getInstanceByName($fileName);

        if ($useFile !== false) {
            $file = $file[0];
        }

        if (is_null($file)) {
            throw new BadRequestHttpException('No file specified to upload.');
        }

        return $this->insertMedia($file);
    }