ios - Only 82 kb 0f 3 MB is downloading from Google Drive? -
hi downloading media file of 3 mb google drive. file finish downloading after 82 kb.. not downloading completely. have checked small file.. download size remains constant size of file.. 82 kb..
i trying gtmhttpfetcher download..but getting error
-(void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { gtldrivefile *file; nsstring *downloadedstring = file.downloadurl; // file gtldrivefile nslog(@"%@",file.downloadurl); gtmhttpfetcher *fetcher = [self.driveservice.fetcherservice fetcherwithurlstring:downloadedstring]; [fetcher beginfetchwithcompletionhandler:^(nsdata *data, nserror *error) { if (error == nil) { if(data != nil) { gtldrivefile *file = [drivefiles objectatindex:indexpath.row]; filename=file.title; nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); filename = [[paths objectatindex:0]stringbyappendingpathcomponent:[nsstring stringwithformat:@"%@",filenames]]; nsdata* data = [[nsdata alloc]initwithcontentsofurl:targeturl]; [data writetofile:filename atomically:yes]; nslog(@"my path:%@",filename); } } else { nslog(@"error - %@", error.description); } }]; // above code error **domain=com.google.gtmhttpfetcher code=-1 "the operation couldn’t completed. (com.google.gtmhttpfetcher error -1.)"**
i don't have solution, have diagnosis, , next step. if multiple files, long, short, fetching 82kb, double check fetching correct url.
it looks like, when user chooses filename aren't fetching correct url, returning 82kb of data, directory listing.
you can check running dredit sample app https://developers.google.com/drive/examples/objectivec , turning on gmhttpfetcher logging, (gmhttpfetcher wrapper nsurlconnection) http://code.google.com/p/gtm-http-fetcher/wiki/gtmhttpfetcherintroduction#http_logging
Comments
Post a Comment