Skip to content

Commit

Permalink
upload fileinfo bugs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
steevenz committed Oct 3, 2018
1 parent b197c1a commit cdfd759
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Handlers/Uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,16 @@ protected function validate(UploadFile $file)

protected function move(UploadFile $file, $targetPath)
{
$fileInfo = [
'name' => $file->getClientFilename(),
'mime' => $file->getFileMime(),
'size' => $file->getSize()
];

$file->moveTo($targetPath);

if ( ! $file->getError()) {
$this->uploadedFiles[] = pathinfo($targetPath, PATHINFO_BASENAME);
$this->uploadedFiles[] = $fileInfo;
} else {
$this->errors[] = $file->getError();
}
Expand Down

0 comments on commit cdfd759

Please sign in to comment.