mirror of
https://github.com/crazywhalecc/choir-psr-http.git
synced 2026-03-17 20:24:52 +08:00
Update UploadedFile.php
This commit is contained in:
parent
a253ddfb29
commit
103e88977c
@ -22,6 +22,8 @@ class UploadedFile implements UploadedFileInterface
|
||||
* @var null|string
|
||||
*/
|
||||
private $file;
|
||||
|
||||
private string $key;
|
||||
|
||||
private bool $moved = false;
|
||||
|
||||
@ -45,11 +47,17 @@ class UploadedFile implements UploadedFileInterface
|
||||
$this->client_media_type = $this->fileinfo['type'] ?? null;
|
||||
$this->error = $this->fileinfo['error'];
|
||||
$this->size = $this->fileinfo['size'];
|
||||
$this->key = $this->fileinfo['key'];
|
||||
|
||||
if ($this->isOk()) {
|
||||
$this->file = $this->fileinfo['tmp_name'];
|
||||
}
|
||||
}
|
||||
|
||||
public function getKey(): string
|
||||
{
|
||||
return $this->key;
|
||||
}
|
||||
|
||||
public function isMoved(): bool
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user