Skip to content

Commit

Permalink
Bugfix close #389 (#391)
Browse files Browse the repository at this point in the history
* Bugfix close #389

* Fix tests.
  • Loading branch information
overtrue committed Apr 16, 2016
1 parent 3fee0a2 commit ce90da3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Material/Temporary.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public function download($mediaId, $directory, $filename = '')

$stream = $this->getStream($mediaId);

$ext = File::getStreamExt($stream);
$filename .= File::getStreamExt($stream);

file_put_contents($directory.'/'.$filename.'.'.$ext, $stream);
file_put_contents($directory.'/'.$filename, $stream);

return $filename.'.'.$ext;
return $filename;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Material/MaterialTemporaryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class File
{
public static function getStreamExt()
{
return 'jpg';
return '.jpg';
}
}
}
Expand Down

0 comments on commit ce90da3

Please sign in to comment.