Author Topic: [BUG] Chrome adds hyphens (-) to filename  (Read 1702 times)

0 Members and 1 Guest are viewing this topic.

Offline Linuus

[BUG] Chrome adds hyphens (-) to filename
« on: 07. April 2010, 13:48:22 »
Hi!

I'm using the download plugin and if I upload a file called: filename.zip
and download it with Safari, everything is fine.

However if I download the file with Chrome it's renamed to -filename.zip-
It adds hyphens to the filename. The users must remove these before they can open the file. Very annoying.

Anyone has a solution to this?
Country: Sweden Sweden |  OS: Mac OS X 10.6.3 Mac OS X 10.6.3 |  Browser: Chrome 5.0.342.7 Chrome 5.0.342.7 | View Profile

Offline lilax

Re: [BUG] Chrome adds hyphens (-) to filename
« Reply #1 on: 21. November 2010, 14:22:55 »
Yes its a bug,
find line 278 in download.class.php :
header("Content-Disposition: attachment; filename = \"{$file->filename}\"");
and remove double quotes.
The 278 line should look like this:
header("Content-Disposition: attachment; filename = {$file->filename}");

It solves the problem.
Regards.
Country: Lithuania Lithuania |  OS: Windows XP Windows XP |  Browser: Firefox 3.6.8 Firefox 3.6.8 | View Profile

Do you want continued ongoing development, new features and active support?
Please write a review or just vote for SOBI on JED.

Tags: