in "private download" mode URLs arn't working.

return url('system/files/'. $path, array('absolute' => TRUE));
should be
return url('system/files/'. file_directory_path(). '/' . $path, array('absolute' => TRUE));

Comments

damien tournoud’s picture

Status: Active » Postponed (maintainer needs more info)

The original call *is* correct.

Could you describe the issue you are facing?

jlarky’s picture

hardly ) i am not good speaking in english.

1. I've attached file. and now it in sites/default/files/ directory
2. link is http://geo.phys.spbu.ru/~jlarky/drupal/?q=system/files/td_123.pdf - it's "Page not found" page
3. I've added file_directory_path(). '/' and link becomes into http://geo.phys.spbu.ru/~jlarky/drupal/?q=system/files/sites/default/fil... so it's would be.

jlarky’s picture

Version: 6.5 » 6.9

6.9 has this bag too

jlarky’s picture

Status: Postponed (maintainer needs more info) » Active
mdupont’s picture

Status: Active » Closed (cannot reproduce)

Most probably it's a bug in your server configuration, as a lot of people are using private downloads without problem.