non-standard HTTP header supported by Apache to offload the process of serving large static files from dynamic scripts (eg: PHP, Python, Perl) after they have performed the necessary authorization or restriction logic.
Questions tagged [x-sendfile]
155 questions
4
votes
1 answer
Downloading large(ish) zip served with PHP gets corrupted for people with a slow connection
I'm a novice, so I'll try and do my best to explain a problem I'm having. I apologize in advance if there's something I left out or is unclear.
I'm serving an 81MB zip file outside my root directory to people who are validated beforehand. I've been…

stringerbell
- 269
- 2
- 7
4
votes
1 answer
X-Sendfile error, file not found
I'm using apache2 webserver and I have installed mod_xsendfile
I have something like:
header('Content-type: application/zip');
header('Content-Disposition: attachment; filename="file.zip"');
…

takeit
- 3,991
- 1
- 20
- 36
3
votes
1 answer
Move `X-Accel-Redirect` pattern for protected static in kubernetes setup
We are moving to kubernetes and we are totally new to it.
In our current mono service setup we have: Nginx -> Web application. These way we can protect some static assets via authentication in the web application and use internal and…

meili
- 191
- 5
3
votes
2 answers
collective.xsendfile, ZODB blobs and UNIX file permissions
I am currently trying to configure collective.xsendfile, Apache mod_xsendfile and Plone 4.
Apparently the Apache process does not see blobstrage files on the file system because they contain permissions:
ls -lh…

Mikko Ohtamaa
- 82,057
- 50
- 264
- 435
3
votes
0 answers
NGINX X-Accel-Redirect doesn't pass Content-Type automatically?
Doesn't (or can't) NGINX's X-Accel-Redirect automatically pass the Content-Type header based on the file?
The NGINX part:
location /file {
rewrite /file/(.+) /file.php?params=$1 last;
}
location ~ /files {
internal;
root…

Xairoo
- 335
- 1
- 9
3
votes
1 answer
Django sendfile with nginx failed to send the file as attachment
I'm using django-sendfile for sending a large file as attachment to the UI. This works with sendfile.backends.simple backend but when I use sendfile.backends.nginx, it returns 404 error on nginx logs.
I think there was something wrong with my nginx…

Avinash Raj
- 172,303
- 28
- 230
- 274
3
votes
1 answer
Downloading a binary file with POST method in React Native
I am using React-native on the front end with a PHP backend on my server. I need to be able send a passcode to the server that I want to download a file from. I am connecting to a PHP script which is using the X-SendFile library to send the file…

kojow7
- 10,308
- 17
- 80
- 135
3
votes
2 answers
412 - Precondition Failed for files delivered with X-SendFile
I got a weird behavior with larger video files that are delivered to user with X-SendFile. The server responds with 412 - Precondition Failed.
If i disable the X-SendFile everything is ok, so it's got to be related to that.
Some code:
$finfo =…

Bobby Tables
- 866
- 1
- 9
- 18
3
votes
1 answer
MongoDB's GridFS, Rails 3, X-Sendfile, and ACL's, HOW-TO?
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…

clyfe
- 23,695
- 8
- 85
- 109
3
votes
2 answers
Downloading large files with PHP using mod_xsendfile on linux
I had the need to serve very large files (1Gb+) from my webserver using PHP and authentication, so that only some customer had the rights to download files.
I didn't want to use direct links and using a PHP script to serve the files wasn't an option…

Dario Corno
- 1,129
- 11
- 19
3
votes
1 answer
What encoding does xsendfile expect?
It seems like googling for xsendfile issues produces a number of hits that are contradictory/outdated.
In the interest of full disclosure, I'm taking about xsendfile 1.0 beta, documented at https://tn123.org/mod_xsendfile/beta/ (this site doesn't…

sootsnoot
- 2,178
- 3
- 22
- 27
3
votes
0 answers
how to debug playing videos on iphone
I am trying to play videos through a proxy using php on iphone, the video format is .mp4 and it works on every other device and browser through both proxy and through direct access. The Iphone will work on on direct access but not through the proxy…

John J
- 195
- 1
- 1
- 11
3
votes
2 answers
mod_xsendfile Firefox resume issue
We are trying to use mod_xsendfile with Apache to efficiently handle large file downloads (> 1 GB). After installation the configuration looks like:
XSendFile on
XSendFilePath…

madhatter
- 41
- 2
3
votes
1 answer
How to install xsendfile for httpd 2.4 on amazon linux ami?
How to install xsendfile for httpd 2.4 on amazon linux ami? Default package repositories from amazon and epel do not have a package for httpd 2.4, only for httpd 2.2. I would prefer not to compile the module if possible. Thank you.

Keilo
- 963
- 1
- 7
- 13
3
votes
3 answers
Rails: Opening a file using an incomplete file name
I'm using ruby on rails and I'm wondering if there is a way for me to open a file in which I am missing the last few characters of the file name.
For example: my file name is "/folder/files/A2222_revA.pdf". However, these file names are changing…

sabrams
- 1,128
- 2
- 15
- 28