Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to show UIProgressView with ASIFormDataRequest
    primarykey
    data
    text
    <p>I want to show uiprogress bar with ASIFormDataRequest. I googled it but i can't find regarding uiprogressView with ASIFormDataRequest, I just find uiprogressView with NSURLConnection. just let me know if it is possible.</p> <p>// So this my method where i upload the data.</p> <pre><code>-(NSMutableArray*)getUploadVideo:(NSString*)titleName userID:(NSString*)userId token:(NSString*)tokenID description:(NSString*)desc videoID:(NSString*)video_id privateOrPublic:(NSString*)privacyID pathOfVideoFile:(NSString*)path mode:(NSString*)potLand; { ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:@"http://%@/aircastdev/RestServices/fileUpload"],kId]; [request setDelegate:self]; [request setDidFailSelector:@selector(uploadFailed:)]; [request setDidFinishSelector:@selector(uploadFinished:)]; [request setDidFinishSelector:@selector(requestFailed:)]; [request setDidFinishSelector:@selector(requestFinished:)]; [request setPostValue:titleName forKey:@"title"]; [request setPostValue:userId forKey:@"user_id"]; [request setPostValue:tokenID forKey:@"token"]; [request setPostValue:desc forKey:@"desc"]; [request setPostValue:video_id forKey:@"video_id"]; [request setPostValue:privacyID forKey:@"is_private"]; [request setPostValue:potLand forKey:@"mode"]; NSString *url = [[NSURL fileURLWithPath:path] path]; [request setFile:url withFileName:[NSString stringWithFormat:@"%@.mov",titleName] andContentType:@"video/MOV" forKey:@"file"]; [request setTimeOutSeconds:50000]; [request setRequestMethod:@"POST"]; // EDITED LINE [request setUploadProgressDelegate:myProgressView]; [request startSynchronous]; SBJSON *sbJason = [[SBJSON alloc] init]; getUploadArray = [sbJason objectWithString:self.response]; return getUploadArray; } </code></pre> <p>// when upload is done this method call.</p> <pre><code>- (void)requestFinished:(ASIHTTPRequest *)request { // alert: request is successfully sent self.response = [request responseString]; //stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload