Skip to content

Commit

Permalink
Handle spaces in filenames of Media Manager uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
René Alain Erichsen committed Mar 29, 2016
1 parent 0750ba7 commit ec6a257
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions administrator/components/com_media/controllers/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function upload()
foreach ($files as &$file)
{
$file['name'] = JFile::makeSafe($file['name']);
$file['name'] = str_replace(' ', '-', $file['name']);
$file['filepath'] = JPath::clean(implode(DIRECTORY_SEPARATOR, array(COM_MEDIA_BASE, $this->folder, $file['name'])));

if (($file['error'] == 1)
Expand Down

0 comments on commit ec6a257

Please sign in to comment.