/** * Return the original filename of the uploaded file, as reported by * the submitting user agent. HTML-style character entities are * interpreted and normalized to Unicode normalization form C, in part * to deal with weird input from Safari with non-ASCII filenames. * * Other than this the name is not verified for being a safe filename. * * @param $key String: * @return string or NULL if no such file. */ public function getFileName($key) { $file = new WebRequestUpload($this, $key); return $file->getName(); }
/** * Initialize the uploaded file from PHP data * @param $request WebRequest */ protected function initializeUpload($request) { $file = new WebRequestUpload($request, 'wpUploadFile'); $this->mTempPath = $file->getTempName(); $this->mFileSize = $file->getSize(); $this->mSrcName = $file->getName(); }