Downloading bug report:

after enabling option "Enable private downloads" files in directories protected with apache rules:


Order allow,deny
deny from all

are having problem with download. after request to download file, file downloads correctly but its name is weird, not the same as in browser. It seems that browser assign name file by its own decision, that mean server does not provide any name for file.

Comments

stoneforger’s picture

First of all check you have fileinfo installed and working, you might need to relocate or copy your magic.mime file.

Also, in the module the header line
header("Content-Disposition: attachment;");

should be changed to something like
header("Content-Disposition: attachment; filename=\"" . $path_parts[count($path_parts)-1], ."\";");

as described in rfc2183 . At least that's what works for me like a charm.

zewa’s picture

yep stoneforger your recommended solution is exactly what i did
after having the same problem and it solved it too.

Greetings
Zewa

Yoran’s picture

I changed the way of generating the download header, should be ok know (dev version)

Yoran’s picture

Assigned: Unassigned » Yoran
Yoran’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.