Using x_sendfile with Apache/PHP
I can't seem to find much documentation on x_sendfile or example code for PHP (there is some rails code). Anyone use it before and would mind giving a quick snippet of code and a brief description? ...
I can't seem to find much documentation on x_sendfile or example code for PHP (there is some rails code). Anyone use it before and would mind giving a quick snippet of code and a brief description? ...
I’m having some problems with John Guenin's x_sendfile (http://john.guen.in/past/2007/4/17/send_files_faster_with_xsendfile/). When coding the download of a PDF file, I’m using the following code: def send_the_file(filename) xsendfile (“#{Rails.root}/doc/” + filename, :type => ‘application/pdf’) end but I only get 1 byte downloaded...
Let's say I have a Rails 2.3.2 application fronted by nginx and served by mongrel in which I need to serve a large static file through Rails (to control access to it). I want the Rails app to delegate the transfer of the file to nginx, to avoid blocking the mongrel instance. The available information seems contradictory and incomplete. ...
I am using lighttp 1.5 on CentOS release 5.2. The site is a free stock photo site that allows users to download files. Files are around 3-6MB each. The download script is a php script that looks like this. set_time_limit(0); //... header( "Content-Disposition: attachment; filename=\"" . $title . '"' ); header( "Content-type: image/...
Any filesize over about 4GB is not going to work with the mod_xsendfile for Apache2 (as it sets the content length to a long). I am willing to rewrite it to support this; however, I can find no documentation on how to set content length from the apache api to something larger than a long and thus serve large files through Apache. I know...
Hi to all! We have a big problem with downloads when the size is over than 1gb. We are using Rails 2.3.5, passenger 2.2.9 on Amazon EC2 2gb with 2gb of Ram and Fedora 10. Files are stored on /mnt/files, project is on /mnt/www/project We tried to send files with Nginx and x-accel-redirect and also Apache with x-sendfile. We can down...
Hi everybody, I have a web application which has some multimedia files stored in a user protected area. To make these files available to logged in customers, I consider using the x-sendfile plugin. x_send_file(path, :type => 'application/pdf') It is just strange that every time I run this function an empty file gets sent to the brows...
Is there some way to use something similar to x-sendfile for uploading files, e.g. saving particular stream/parameter from request to file, without putting it wholly into memory? (In particular, with apache2 and ruby fcgi) ...
Hi, I'm trying to install the mod_xsendfile Apache Module on Windows (7) x64 (using Apache 2.2) -- yes I'm doomed from the get-go, I know :-). Apparently there is : a) No Win x64 binary for mod_xsendfile, just a Win32 binary from the module's website b) No Win x64 binary for apxs from ApacheLounge I've tried the usual LoadModule xse...
I have a Rails 3 project that does file upload/download, with access rights (User has many Files, and can only read/write his own files). If I store my files on classic filesystem, I can check the access to the file in my rails app and then use X-Sendfile header to redirect to the file, if user has access. In this way, a user can neve...