Suggestions of some good, simple file upload 'in progress' code?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Can someone pass on some suggestions of some good, simple file upload 'in 
progress' code?

Maybe as simple as changing the cursor icon for the duration?

I have am HTML form that gathers some data and allows for a file upload of 
up to 80Mb (on a secure site, and limited to *.zip files) - all works well, 
pretty simple stuff...     <smile>

    ...
    <input type="file" name="new_module_zip_file" id="file" size="50"/>
    ...
    {uses array_key_exists, various checks to make sure a file is selected, 
has a ZIP extension, etc)
    ...
    //store the $_FILES 'final' file name in a variable for later use...
          $_SESSION['final_uploaded_zip_file_name'] = 
$_FILES['new_module_zip_file']['name'];

          //DRAFT @ 04/06/09 --> change cursor icon whilst the file is 
uploading and/or use a progress bar

          //save the temp file that $_FILES creates to it's "upload" home, 
ready for the site manager to process
          move_uploaded_file($_FILES['new_module_zip_file']['tmp_name'],$default_upload_directory.$_SESSION['final_uploaded_zip_file_name']);
    ...

The user can look in the the lower left, say, to see they upload progress 
(sic) that is part of the browser.

BUT it would be nice to have some page specific visual prompt for the user, 
depending on their connection 80Mbs might take a while!  <grin>     As 
mentioned, even something as simple as changing the cursor to an hourglass 
for the duration might help...

I have found a few examples of upload meters, but was looking for something 
simpler - and, to be frank, something more within the grasp of my current 
PHP coding abilities (or lack thereof!)

*Thanks in advance*:
GREG...




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux