Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Sending files with XSendFile

by rpnoble419 (Pilgrim)
on Oct 22, 2012 at 03:32 UTC ( #1000255=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print "X-Sendfile: C:\\Path\\to\\file\\video\\";
    print "Content-Type:application/octet-stream; name=\"File-12.mp4\"\r\n
    +";
    print "Content-Disposition: attachment; filename=\"File-12.mp4\"\r\n\n
    +";
    print "\n\n";
    exit;
    
  2. or download this
    <?php
    ...
    ...
    ?>
    <h1>Permission denied</h1>
    <p>Login first!</p>
    
  3. or download this
    # enable xsendfile
    XSendFile On
    XSendFilePath C:/Path/To/Files/
    
  4. or download this
    my $file = "C:/Patch to file/FiletoSend.mp4";
    my $filesize = -s $file;
    ...
    
    exit;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1000255]
Approved by McDarren
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2015-01-25 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (181 votes), past polls