Ebeo / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

PDF Upload Problem #404

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to upload a PDF file over 5MB in size.
2.
3.

What is the expected output? What do you see instead?

Fails to upload with an exception.

What version of the product are you using? On what operating system?

1.6 on Win7 x64

Please provide any additional information below.

Trying to upload PDF files via the API. Files below 5 MB upload fine. Files 
over 5MB throw exception. I get the same error with 1.5 and 1.6, I have also 
confirmed that the files upload fine with the web interface.

{"The request was aborted: The request was canceled."}

Inner:

{"Cannot close stream until all bytes are written."}

Stack Trace:

   at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean aborting)
   at System.Net.ConnectStream.System.Net.ICloseEx.CloseEx(CloseExState closeState)
   at System.Net.ConnectStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at Google.GData.Client.GDataGAuthRequest.CopyRequestData()
   at Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter)
   at Google.GData.Client.GDataGAuthRequest.Execute()
   at Google.GData.Client.Service.StreamSend(Uri targetUri, Stream inputStream, GDataRequestType type, String contentType, String slugHeader, String etag, AsyncSendData data)
   at Google.GData.Client.Service.StreamSend(Uri targetUri, Stream inputStream, GDataRequestType type, String contentType, String slugHeader)
   at Google.GData.Client.Service.Insert(Uri uriTarget, Stream input, String contentType, String slugHeader)
   at Google.GData.Documents.DocumentsService.UploadFile(String fileName, String documentName, String contentType, Boolean convert)
   at DocListUploader.HiddenForm.UploadFile(String fileName) in D:\Documents\Google Data API SDK\Sources\Samples\DocListUploader\HiddenForm.cs:line 224

Original issue reported on code.google.com by timhaugh...@gmail.com on 12 Jul 2010 at 12:17

GoogleCodeExporter commented 9 years ago
Try to use the ResumableUplaoder component.

Did you ask in the google docs forum if there is a size restriction on the API? 

Original comment by fman...@gmail.com on 13 Jul 2010 at 4:33

GoogleCodeExporter commented 9 years ago
Thanks for the response. I have asked in the API forum but no reply yet. The 
docs, if I am reading them correctly seem to suggest a 1 gig limit for files 
that are not converted into a native Google Docs format, but will await 
confirmation.

And no, I haven't tried the ResumableUploader. Honestly I didn't know it was 
there, I'd used the DocList uploader as a template.

There don't seem to be any docs relating to using the ResumableUploader with 
Docs, any pointers?

Original comment by timhaugh...@gmail.com on 13 Jul 2010 at 8:56

GoogleCodeExporter commented 9 years ago
No reply on the Google API forum.

Any pointers on using the ResumableUploader with Google Docs?

Original comment by timhaugh...@gmail.com on 18 Jul 2010 at 9:58

GoogleCodeExporter commented 9 years ago
The ResumableUploader component was fixed in rev. 1049 and the fix is now 
included in v 1.7.0.1 of the client library

Original comment by ccherub...@google.com on 7 Dec 2010 at 8:40