Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Good method to pass files throught perl/cgi script ?

by thomas895 (Deacon)
on Jul 10, 2013 at 23:12 UTC ( [id://1043588]=note: print w/replies, xml ) Need Help??


in reply to Good method to pass files throught perl/cgi script ?

Since you don't seem to be doing anything very server-related, why not just put the files in a directory and allow those to be downloaded directly?

If that is not an option, then consider using a file host or CDN of sorts, where you can upload these files to as they come in.

~Thomas~ 
"Excuse me for butting in, but I'm interrupt-driven..."
  • Comment on Re: Good method to pass files throught perl/cgi script ?

Replies are listed 'Best First'.
Re^2: Good method to pass files throught perl/cgi script ?
by Martin90 (Sexton) on Jul 11, 2013 at 10:17 UTC
    No, what I am doing is very server-related. I want to have content on my server since I have my own music player + statistic of downloaded files. ALso I would like to control if files was downloaded completely + need to control download speed and so on. So, if I use nginx along with apache and pass files thru nginx with XSendfile, would it help much ? Maybe there are other options ?

      As far as I know, you can't control or even see the download speed in a CGI program. Your script just reads and outputs the whole file to STDOUT, which the server then just passes along to the client. The server probably buffers it, too, so the time it took for the file to be output does not necessarily have to be the time it really took to download. Sendfile won't tell you that, either.

      As far as statistics go, you can write or use a logfile analyser, then count how many times each file was downloaded and by whom, etc.
      Fun fact: you can also add query parameters to the static file locations, and most webservers will not do anything with them by default. Use this to add extra info that you might want to analyse later.

      ~Thomas~ 
      "Excuse me for butting in, but I'm interrupt-driven..."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1043588]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-19 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found