I've been working on uploading files via webmin. I've created a little module to upload a binary file using CGI.pm's upload function. Of course it works for small files, but as files get larger, it takes too long and the browser does not give any indication of the progress (not that I expected it to, but thats another question).
I have a couple of questions and am seeking advice.
Advice1: I basically have to be able to upload a 100MB file. I truthfully didn't really expect this solution to work as is, but had to start somewhere so I started using CGI.pm's upload. Does anyone have a better idea of a way to do this. Really the only requirement I have is that I need to implement it via Webmin (for those who don't know what this is, its a web based server administration tool written entirely in perl - www.webmin.com - check it out, its great!).
Q1: does the upload function of CGI.pm read the entire file into memory before continuing with the script? If so, is there a method of streaming it to a file on disk rather than slurping it all up first?
Q2: anyone know of any good examples of the CGI:upload_hook callback? I'm assuming it would be best to pop a window up using this call back and have the user refresh it every min or so.
Thanks everyone, while i'm not an avid poster on perlmonks, I certainly read and enjoy the posts and feeling of community!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.