Hi Greg,
Thanks for the follow up. Most of the time when I hit this issue, I
was getting status 400, however I've seen timeouts (-1001) as well.
Here are the relevant chunks of code which demonstrate precisely how
we upload text files. By the way, since these are typically short
notes (taken on an iPhone), we decided against chunked uploads to
reduce the number of server round-trips.
GDataServiceGoogleDocs* service = [[[GDataServiceGoogleDocs alloc]
init] autorelease];
[service setUserAgent:kGoogleUserAgent];
[service setShouldCacheDatedData:NO];
[service setServiceShouldFollowNextLinks:YES];
[service setIsServiceRetryEnabled:YES];
[service setServiceUploadChunkSize:0];
[service setUserCredentialsWithUsername:username
password:password];
// ...
remoteEntry = [GDataEntryStandardDoc documentEntry];
[remoteEntry setTitleWithString:title];
[remoteEntry setPublishedDate:[GDataDateTime
dateTimeWithDate:localDocument.date timeZone:calendar.timeZone]];
[remoteEntry setUploadData:uploadData];
[remoteEntry setUploadMIMEType:@"text/plain"];
postURL = [[self.syncedFolderFeed postLink] URL];
self.ticket = [service fetchEntryByInsertingEntry:remoteEntry
forFeedURL:postURL delegate:self
didFinishSelector:@selector(remoteInsertTicket:finishedWithEntry:error:)];
Have a great day!
-Christoph
On May 8, 4:10 pm, Greg Robbins <grobb...@google.com> wrote:
> Your upload is being done with the older multipart MIME upload protocol,
> rather than the newer chunked protocol, but the old protocol should continue
> to work.
> When I try to reproduce this with the DocsSample application, I'm seeing
> timeouts (CFNetwork error -1001). With the library's automatic retry on, and
> under chunked uploads, the library's retry attempt is correctly requesting
> the position from which to upload the next chunk (a PUT with
> header Content-Range = "bytes */7") and the upload server is sending back
> the status 400, "Could not convert document"
> With chunked uploads disabled, as is shown in your message (that is, the
> upload body is multipart/related), I'm just seeing the timeout, CFNetwork
> error -1001. The library can't successfully retry multipart uploads because
> it builds them with NSInputStream, but that doesn't affect chunked uploads.
> In any case, I suspect you're seeing a problem with timeouts from the
> server. Does that mesh with your http logs of the problem?
> --
> You received this message because you are subscribed to the Google Groups "Google Data APIs Objective-C Client Library Discussion" group.
> To post to this group, send email to gdata-objectivec-client@googlegroups.com.
> To unsubscribe from this group, send email to gdata-objectivec-client+unsubscribe@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/gdata-objectivec-client?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google Data APIs Objective-C Client Library Discussion" group.
To post to this group, send email to gdata-objectivec-client@googlegroups.com.
To unsubscribe from this group, send email to gdata-objectivec-client+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gdata-objectivec-client?hl=en.