Hi,

some of the webserver have the possibility to get the files for the response from the backend.

http://wiki.codemongers.com/NginxXSendfile
http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI
http://tn123.ath.cx/mod_xsendfile/

I have try this with nginx and the current webfm version and add in webfm_send_file() the follwoing line:

$header[] = 'X-Accel-Redirect: /'.$f->fpath;

before

//drupal file_transfer will fail if file is not inside file system directory
file_transfer($f->fpath, $header);

and in nginx

###
location /sites/default/files {
internal;
}
###

are you interested in such a patch?

I think there should be a option in the in the 'WebFM' settings if the user want to use the sendfile option.

any opinion in this?

BR

Aleks

Comments

nhck’s picture

Status: Active » Postponed

Aleks,
thank you for posting this and helping to make webfm better. We are always interested in a patch. I am just wondering if this wouldn't expose the real paths of the files? Maybe we could add it as an option in the backend.

Get back to us if you are still working on this.

Thank you very much.

hedac’s picture

I'm using nginx
this would be interesting