I have a scenario in which I have to inform user about how much time their file would take to successfully upload to FTP Server
using internet. I am here if someone have any idea or suggestions on how to do that? I know that it would take the size of file and the internet speed.
More suggestion are welcome.
Thanks in advance
iOS - How to find the estimated time left for uploading a file
785 views Asked by Syed Ali Salman At
2
There are 2 answers
7
On
Instead of giving an actual time estimate, I recommend using a UIProgressView object to show both overall progress and speed. Simply update the progressView.progress (which ranges from 0.0 to 1.0) each time a chunk of data is sent in your run loop. This will keep the user informed on a deeper level than simply by giving a time estimate (which would not effectively show changes in upload speed along the way).
Simply declare a UIProgressView object as a property of your uploading class, initialize it in viewDidLoad (or in the class's init method), and then use it as a standard part of your uploading process.
It can be done by
sending packet of bytes
and see after how much timespecific size
ofdata
isuploaded completely
, only then you can find out yourupload speed
...