lloydsargent / BlackRaccoon

IOS FTP Client Code
102 stars 37 forks source link

Upload percent completed always says 0.000 #63

Closed sahibhussain closed 7 years ago

sahibhussain commented 8 years ago

whenever i try to upload an image the method percentComplete always show 0.000 but after sometime it goes to requestCompleted..

what should i do

here are the screen shot.

lloydsargent commented 8 years ago

Did you implement the following delegate? (It is optional)

The idea is that you return the total size of the file. So in your code you will have something like the following:

- (long) requestDataSendSize: (BRRequestUpload *) request
{
    //----- user returns the total size of data to send. Used ONLY for percentComplete
    return [your_upload_data length];
}

This should give you a correct percentComplete.