Module is incompatible with private files

jonathan_hunt - June 2, 2008 - 11:02
Project:Graphviz Filter
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:kratib
Status:closed
Description

I have the module working and rendering graphviz output to the graphviz dir. Unfortunately this module is incompatible with private files, so the images paths are not resolving. The module needs to implement hook_file_download($file).

I have a workaround (very ugly) along the following lines:

function xxx_file_download($file) {
  $file = file_create_path($file);
  if (strpos($file, 'graphviz')) {
    return array(
      'Content-Length: '. filesize($file),
    );
  }
}

#1

kratib - June 2, 2008 - 19:04
Assigned to:Anonymous» kratib
Status:active» fixed

Thanks! I fixed it in a similar way, not sure what's ugly about it :-)

#2

kratib - June 2, 2008 - 19:05
Version:5.x-1.0» 5.x-1.x-dev

#3

Anonymous (not verified) - June 16, 2008 - 19:11
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.