Hi Maintainers,

second problem with private_upload. Now I´m not able to download the files! I installed the beta6 version on a life site (drupal 5.5, php 5, MySQL 5) and the private files are not downloadable as logged in user. Even not as user one.

When i go to download the files I got an 403 error message from my provider. The URL of the file is www.freelens.com/files/private/any.pdf.

It looks like the system is leading me directly to the file insteat of letting Drupal handel the file, like with the "private download" activated.

Any idea

warm regards from cologne.

Dirk

Comments

designwork’s picture

Status: Active » Fixed

Dear Maintainers,

Sorry for the new issue. Solved it my self. The problem was that I had in my template.php and the node.tpl overridden the theme upload function. Changed everything to theme_private_upload and its working perfectly.

Dirk

headkit’s picture

my download is also not working. is it because of the template.php function

function garland_upload_attachments($files, $in_block = false) {
  if (!$in_block) {
    return;
  }
  $header = array(t('Attachment'), t('Size'));
  $rows = array();
  foreach ($files as $file) {
    if ($file->list) {
      $href = $file->fid ? file_create_url($file->filepath) : url(file_create_filename($file->filename, file_create_path()));
      $text = $file->description ? $file->description : $file->filename;
      $rows[] = array(l($text, $href), format_size($file->filesize));
    }
  }
  if (count($rows)) {
    return theme('table', $header, $rows, array('id' => 'attachments'));
  }
}

??

what should i change?
thanx!

designwork’s picture

Use the themable function in the private module function theme_private_upload_attachments. The line changed is 9 $herf = _private_upload..........

Dirk

Anonymous’s picture

Status: Fixed » Closed (fixed)

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