Search code examples
webprogress

uploading and processing file progress


I am working with Yii framework. My goal is to upload an xls file, parse it and load information into data base.

The problem is that the file is too big and it is required to have a progress bar corresponding to the process. I am not a very experienced developer and the task is tricky.

How can i accomplish that?


Solution

  • wierd that nobody advised anything...

    I have done the following:

    • save the uploaded file and find the maximum row

    • redirect to another page with progress bar

    • send the starting row and a chunk size from the frontend

    • load the chunk into database (phpexcel allows to read a chunk from file);

    • get responce in front end and increase the progress bar.

    Not that fast and informative method, but at least i didn't have to get hard with sockets