Jump to content

Text file read progress...


nothingatall

Recommended Posts

Okay, this one has been bugging me for a while now...

I have an ajax/iframe upload in place that is primarily for large text files (100,000+ rows of data). The uploading is no problem and all that nor is really the parsing of the file once it has been uploaded. The problem I have is that I want to put a progress bar of some form up whilst the text file is being read (after the upload). At the moment there is a simply swirly animated gif doing its thing, which is fine, but... this is for people who dont know anything computer related and I know they will just not wait long enough(!)

 

I have done a lot of looking round, and I guess there are a few ways of doing so, but I will be honest and say I'm not sure how to implemet it or anything. I could read the number of lines in the file and use that as the basis for working out the % complete. (or maybe just average it out say 500 lines, work out the rough size of each line and use it as an average). Or possibly go by file size.

 

Whichever way is good. I guess I dont fully understand how to get the ajax up and running with it all. How do I make an ajax call say every 5 seconds to determine its progress? I can do it on state change, but I guess I'm still learning with it all...

 

Anyway, any help would be appreciated indeed.

Ta

Link to comment
https://forums.phpfreaks.com/topic/171758-text-file-read-progress/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.