Open GoogleCodeExporter opened 9 years ago
Original comment by rmis...@google.com
on 18 Jan 2013 at 6:27
The problem I am running into is (using example values):
Original content length - 10000
Gzipped content length - 8000
Minimum chunk size - 2000
Initiation request says x-upload-content-length will be 8000
We start uploading a chunk of 2000 from the original content of 10000.
The chunk gets gzipped in HttpRequest and is now 1500.
This 1500 is below the minimum chunk length allowed and an exception is thrown.
We do not know what chunk size to use to get a gzipped chunk that is equal to
the specified chunk size.
Original comment by rmis...@google.com
on 24 Jan 2013 at 6:35
Given the above comment I upped the chunk size to
MediaHttpUploader.MINIMUM_CHUNK_SIZE * 2 and calculated the gzipped size of
each chunk but I still end up with an IOException:
CONFIG: -------------- REQUEST --------------
PUT
https://www.googleapis.com/upload/drive/v2/files?uploadType=resumable&upload_id=
AEnB2UpVOG2pvLe4WvfDg6h4DbVv2FuaKP89LWVPOiy24dIIPuma3OffEhCqKe1ahYSdHQ16i18nhW8X
ty_EpXXXRKtJsNEfrQ
Accept-Encoding: gzip
Authorization: <Not Logged>
Content-Range: bytes 0-523351/523670
User-Agent: Google-HTTP-Java-Client/1.14.0-beta-SNAPSHOT (gzip)
Content-Type: image/jpeg
Content-Length: 523352
java.io.IOException: insufficient data written
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.close(HttpURLConnection.java:3120)
at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:241)
at com.google.api.client.http.GZipEncoding.encode(GZipEncoding.java:38)
at com.google.api.client.http.HttpEncodingStreamingContent.writeTo(HttpEncodingStreamingContent.java:51)
at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:80)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1084)
at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:358)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:438)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:363)
I am not sure what is going on, I expected the above to work.
Original comment by rmis...@google.com
on 24 Jan 2013 at 6:44
Doesn't seem worth the effort right now.
Original comment by yan...@google.com
on 26 Jan 2013 at 5:46
Original comment by yan...@google.com
on 7 Feb 2013 at 12:05
Original comment by yan...@google.com
on 10 Jun 2013 at 1:21
Original comment by pele...@google.com
on 29 Jul 2013 at 6:10
Original comment by yan...@google.com
on 27 Sep 2013 at 12:05
Original issue reported on code.google.com by
yan...@google.com
on 20 Dec 2012 at 4:55