Skip to content

Commit

Permalink
exposed the name and extension in the file dto datatransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
benatespina committed Dec 15, 2017
1 parent bc31c0c commit 0bf1763
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ function it_transforms(File $file, \DateTimeImmutable $createdOn, \DateTimeImmut
'created_on' => $createdOn,
'mime_type' => 'image/jpeg',
'file_name' => 'image.jpeg',
'name' => 'image',
'extension' => 'jpeg',
'updated_on' => $updatedOn,
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public function read()
'created_on' => $this->file->createdOn(),
'mime_type' => $this->file->mimeType()->mimeType(),
'file_name' => $this->file->name()->filename(),
'name' => $this->file->name()->name(),
'extension' => $this->file->name()->extension(),
'updated_on' => $this->file->updatedOn(),
];
}
Expand Down

0 comments on commit 0bf1763

Please sign in to comment.