How to upload large size files in chunks using PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neovantage
    New Member
    • Aug 2008
    • 245

    How to upload large size files in chunks using PHP

    Hey all,
    I need to upload files which are large in size. Though there are 2 fuunction which set the max upload file size and increasing the execution time of the script at run time but is there any script which upload large size files and show the status of upload file size during uploading.
    For example if my file size is 100MB then during uploading script tell how much transfer, how much remaining and tells the status of completion in percentage.


    Hope to get the solution from this great experts community as i get always.
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    Originally posted by neovantage
    Hey all,
    I need to upload files which are large in size. Though there are 2 fuunction which set the max upload file size and increasing the execution time of the script at run time but is there any script which upload large size files and show the status of upload file size during uploading.
    For example if my file size is 100MB then during uploading script tell how much transfer, how much remaining and tells the status of completion in percentage.


    Hope to get the solution from this great experts community as i get always.
    I'll bump this up again, but I don't think it's an easy thing to do. I'll look into it for you though because I'm curious and will need it myself in the future.

    Does anybody know if the total file size is declared when the upload starts?

    if we know that, then we can start a process to do the upload while your page (using ajax or refresh) queries the partial download tmp file. e.g. 34MB/100MB (so we show 34% complete) on the page.

    2 things you need:

    1. A way to get the total files size up front
    2. A way to find what PHP is naming that temp file before it is done with it. (this is always generated randomly by PHP)

    Complete those two challenges and the rest is a piece of cake.

    Good luck,






    Dan

    Comment

    • neovantage
      New Member
      • Aug 2008
      • 245

      #3
      Thanks i will try my level best to do that

      Comment

      • dlite922
        Recognized Expert Top Contributor
        • Dec 2007
        • 1586

        #4
        Originally posted by neovantage
        Thanks i will try my level best to do that
        I googled it, there's at least 2 solutions on sourceforge.net that can do this for you, or check out the thousand results I got from google when I searched for "php file upload progress"

        It would be really nice of you if you come back here with a simple code or explanation of how it was done. I'm actually working on a file upload script that would be nice to have it.

        "The best way to reinforce learning is by teaching" -- Anonymous




        Dan

        Comment

        Working...