Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Don't ask to ask, just ask
 
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 chanting in the Monastery: (8)
As of 2014-04-19 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (479 votes), past polls