Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
v1.10 Assert in GDataHTTPUploadFetcher:connect ionDidFinishLoading
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Christoph Z.  
View profile  
 More options Apr 1 2010, 9:04 pm
From: "Christoph Z." <christop...@gmail.com>
Date: Thu, 1 Apr 2010 18:04:48 -0700 (PDT)
Local: Thurs, Apr 1 2010 9:04 pm
Subject: v1.10 Assert in GDataHTTPUploadFetcher:connectionDidFini shLoading
Hi,

I'm trying to upgrade my project to the latest obj-c client. I get the
following assert when executing the code below:

GDataHTTPUploadFetcher.m:241

  NSAssert([[self downloadedData] length] == 0,
                    @"unexpected response data");

Code that used to work until now:

8< ----

remoteEntry = [GDataEntryStandardDoc documentEntry];

[remoteEntry setTitleWithString:title];
[remoteEntry setUploadData:uploadData];
[remoteEntry setUploadMIMEType:@"text/plain"];
[remoteEntry setUploadSlug:title];

postURL = [[self.syncedFolderFeed postLink] URL];

self.ticket = [self.service fetchEntryByInsertingEntry:remoteEntry
forFeedURL:postURL delegate:self

didFinishSelector:@selector(remoteInsertTicket:finishedWithEntry:error:)];

8< ---

When this code executes, the document does get uploaded correctly and
the server responds with status 201. The response contains the newly
inserted entry (as expected), that's why I don't understand this
assert.

Any ideas?

Thanks,
Christoph


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Greg Robbins  
View profile  
 More options Apr 1 2010, 9:14 pm
From: Greg Robbins <grobb...@google.com>
Date: Thu, 1 Apr 2010 18:14:39 -0700
Local: Thurs, Apr 1 2010 9:14 pm
Subject: Re: v1.10 Assert in GDataHTTPUploadFetcher:connectionDidFini shLoading

The DocList and YouTube APIs now use chunked uploads. This thread describes
the change:

http://groups.google.com/group/gdata-objectivec-client/browse_thread/...

All that needs to change in your code is to upload to the feed's uploadLink
rather than the postLink, though you may also want to add support for
pausing and resuming uploads, as shown in the DocsSample app.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Greg Robbins  
View profile  
 More options Apr 1 2010, 9:23 pm
From: Greg Robbins <grobb...@google.com>
Date: Thu, 1 Apr 2010 18:23:41 -0700
Local: Thurs, Apr 1 2010 9:23 pm
Subject: Re: v1.10 Assert in GDataHTTPUploadFetcher:connectionDidFini shLoading

To avoid reading the whole file into memory, you may also use an
NSFileHandle for uploading now, rather than NSData:

NSFileHandle *bigFileHandle = [NSFileHandle
fileHandleForReadingAtPath:bigFilePath];
[newEntry setUploadFileHandle:bigFileHandle];

Also, if your application can replace uploaded files, you should change your
application's uses of the entry editLink for uploading with the new
uploadEditLink.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christoph Z.  
View profile  
 More options Apr 1 2010, 9:47 pm
From: "Christoph Z." <christop...@gmail.com>
Date: Thu, 1 Apr 2010 18:47:16 -0700 (PDT)
Local: Thurs, Apr 1 2010 9:47 pm
Subject: Re: v1.10 Assert in GDataHTTPUploadFetcher:connectionDidFini shLoading
Awesome! Works great!

On Apr 1, 6:14 pm, Greg Robbins <grobb...@google.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »