2 declare(strict_types = 1);
52 if (!isset($uploadInfo[
'tmp_name']) || !isset($uploadInfo[
'name'])) {
54 'Could not determine uploaded file',
58 $this->nameFileInfo = new \SplFileInfo($uploadInfo[
'name']);
59 $this->payloadFilePath = $uploadInfo[
'tmp_name'];
60 $this->payloadFileInfo = GeneralUtility::makeInstance(FileInfo::class, $uploadInfo[
'tmp_name']);
65 return $this->nameFileInfo->getBasename();
72 $this->nameFileInfo->getBasename($this->getExtension()),
79 return $this->nameFileInfo->getExtension();
86 return $this->payloadFileInfo->getSize() ?:
null;
91 $mimeType = $this->payloadFileInfo->getMimeType();
92 return is_string($mimeType) ? $mimeType :
null;
97 return file_get_contents($this->payloadFilePath);
102 return sha1_file($this->payloadFilePath);