Skip to content

Commit

Permalink
Do not used deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
gabsource committed Mar 15, 2019
1 parent c411309 commit e4cb2fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function fromPost($uploadedFile, $disk = null)

$this->disk = $this->disk ?: ($disk ?: Storage::getDefaultDriver());
$this->filename = $uploadedFile->getClientOriginalName();
$this->filesize = $uploadedFile->getClientSize();
$this->filesize = method_exists($uploadedFile, 'getSize') ? $uploadedFile->getSize() : $uploadedFile->getClientSize();
$this->filetype = $uploadedFile->getMimeType();
$this->filepath = $this->filepath ?: ($this->getStorageDirectory() . $this->getPartitionDirectory() . $this->getDiskName());
$this->putFile($uploadedFile->getRealPath(), $this->filepath);
Expand Down

0 comments on commit e4cb2fa

Please sign in to comment.