Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 lurking in the Monastery: (13)
As of 2015-07-28 15:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (257 votes), past polls