Questions tagged [x-sendfile]

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.

155 questions
0
votes
1 answer

Problems embedding PDF file sent with XSendFile in a webpage

I'd like to embed a PDF file in a webpage. I need to dynamically produce the PDF so I can authenticate the user first, so I'm using XSendFile on Apache. The PHP file I have works fine when I visit a browser with the PDF file being immediately…
PeteBrew
  • 434
  • 2
  • 14
0
votes
1 answer

Make Speed Limit In download file by Xsendfile

Is There Any Option To Limit Download Speed In Xsendfile ? I want to Make Speed Limit & Connection Limit By Xsendfile Before Xsendfile In Force Download ( fread() ) I make speed limit by this code : if ($speed > 0 && ($this->bandwidth >…
jasone
  • 23
  • 1
  • 5
0
votes
0 answers

Allowing File Download for iPhone users?

Hope this question is okay, and hopefully not too stupid. I am not an Apple user, so not really familiar with how iPhone users do stuff. We run a digital download store, and we use xSendFile to deliver files to users when the click the download…
BigTed
  • 43
  • 3
0
votes
1 answer

How to view files sent through x-sendfile as GET response

I am using Slim Framework 3. Here's my code: .... $response = $response->withStatus(200) ->withHeader('X-Sendfile', $path) ->withHeader('Content-Type', $contentType) …
Samar Rizvi
  • 300
  • 1
  • 9
0
votes
1 answer

Wrong Response Body while trying to download photo using Retrofit2

I'm using Retrofit 2.0.0-beta2 and I need to download some files from my PHP server. My first approach which worked was to directly use the GET method from its relative server path and I was getting the correct bytes. Now I've tried something more…
Alex Ionescu
  • 413
  • 6
  • 20
0
votes
1 answer

How to use downloaded url content with Xsendfile (Django)

I want to use mod - xsendfile (which I've downloaded and installed) to save content from urls, external pages, that I read in with urllib and urllib2 in the variable one_download.I'm new to this and not sure how to properly configure some of the…
user1749431
  • 559
  • 6
  • 21
0
votes
1 answer

nginx php x-sendfile download 0kb

I am trying to provide a download with X-Sendfile on my nginx server. I have the most up to date version of nginx, and php5. The file requested file exists but it just downloads a empty 0kb file, with no content but with the right filename. I dont…
RaverTiny
  • 51
  • 1
  • 6
0
votes
1 answer

Capistrano and XSendFile configuration

I am trying to configure Rails production server with Apache 2.2, Passenger 4.0.59 and XSendFile 0.12. Application is deployed via Capistrano. Deployed application produces (maybe large) PDF to #{Rails.root}/tmp and serves this file using…
wrzasa
  • 1,113
  • 10
  • 20
0
votes
1 answer

PHP Download Script with mod-xsendfile Implementation

I'm currently using this PHP download script to a serve long list of large files (1GB+) from my website, but after complaints of corrupt downloads I researched and found a better looking alternative: mod_xsendfile. My hosting is with Dreamhost, and…
0
votes
1 answer

How can I stop X-Sendfile from serving the full video file when IE9 makes the request?

I ran into an issue where regardless of the preload attribute setting, when IE9 makes a request for a video, and the video is served by x-sendfile, the request is listed as pending and keeps the connection open. Consequently, if you have 10 videos…
Kevin Somers-Higgins
  • 957
  • 1
  • 10
  • 12
0
votes
1 answer

PHP serving file download, gives .PHP filename when downloading from Safari

I have a php page that is serving files when visited using the XSENDFile module. It works great in most browsers, but in the latest Safari browser the file downloads. And the filesize checks out just fine, however the filename of the file is the…
Matt
  • 896
  • 5
  • 18
  • 47
0
votes
0 answers

Solutions for serving large downloads to prevent interruption from sleep or hibernate?

I'm serving downloads on apache using X-SendFile within PHP. It works great, but the problem I'm anticipating is when users download large >18GB files they may run into issues where their PC's power saving options might interrupt the download. Is…
Matt
  • 896
  • 5
  • 18
  • 47
0
votes
1 answer

Displaying a PDF using send_file

I'm attempting to display uploaded pdf files via a controller method class DocumentsController < ApplicationController def show response.headers['X-Sendfile-Type'] = "X-Sendfile" send_file(@document.file.path, filename:…
Daniel Nill
  • 5,539
  • 10
  • 45
  • 63
0
votes
1 answer

django, embedded url, xsendfile, video embed

I am in the process of building a web app with django. The app is running on apache and files/videos are served with the xsendfile apache module. The app is working fine on iphones, ipads and macs on the local network - when I access the site via a…
adamteale
  • 940
  • 2
  • 12
  • 27
0
votes
2 answers

PHP can't display image using X-SendFile and jpeg headers

For some reason I can't get the image to display properly, its chucking out errors not telling me what’s wrong, any ideas? CODE $finfo = finfo_open(FILEINFO_MIME_TYPE); header("Content-type: ".finfo_file($finfo,…
John J
  • 195
  • 1
  • 1
  • 11