-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete temporary files on close. See XSendFilePath AllowFileDelete Closes #7
- Loading branch information
Showing
1 changed file
with
66 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f2a8c1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can u please suggest me how to configure x-sendfile-temporary in apache2 virtual host? I have configured virtual host like:
<VirtualHost *:80>
ServerName blogApp.shalini.com
DocumentRoot /home/shalini/xbass/public
RailsEnv development
<Directory "/home/shalini/xbass/public">
XsendFileTemporary on
XSendFileTemporaryPath /home/shalini/xbass/tmp/rawdatadownloads/
When I restarted the apache server it is showing the below error:
Syntax error on line 6 of /etc/apache2/sites-enabled/blogApp.shalini.com:
Invalid command 'XSendFileTemporary', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
f2a8c1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation explains how to set up your apache config: https://github.com/nmaier/mod_xsendfile/blob/master/docs/Readme.html
Instead of:
XsendFileTemporary on
XSendFileTemporaryPath /home/shalini/xbass/tmp/rawdatadownloads/
Do:
XSendFile on
XSendFile /home/shalini/xbass/tmp/rawdatadownloads AllowFileDelete
f2a8c1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be clear, if you want to send/delete (send a temporary file) your headers should look like:
header("'X-Sendfile-Temporary: $path_to_somefile");
Rather than the syntax for sending a file you do not wish to delete:
header("'X-Sendfile: $path_to_somefile");
f2a8c1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first i have given:
XSendFile on
XSendFilePath /home/shalini/xbass/tmp/rawdatadownloads AllowFileDelete
its not deleting the file immediately after the download is completed.
2nd i have given:
XsendFileTemporary on
XSendFilePath /home/shalini/xbass/tmp/rawdatadownloads/ AllowFileDelete
giving the error:
Syntax error on line 6 of /etc/apache2/sites-enabled/blogApp.shalini.com:
Invalid command 'XSendFileTemporary', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
...fail!