Database Reference
In-Depth Information
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Date: Wed, 12 Mar 2014 04:35:01 GMT
Server: HTTP Upload Server Built on Mar 3 2014
15:12:04 (1393888324)
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Alternate-Protocol: 443:quic
Notice the X-Upload-* headers used to supply information about the bytes
to be uploaded. The X-Upload-Content-Length header is optional and
can be left out if the size is not known. The URL returned in the Location
header should be used to perform the upload. It is referred to as the
session_url in the snippets that follow. At this point the service is ready
to accept the data to import using the Resumable Upload protocol at the
supplied URL. You can find a detailed description of this protocol at
https://developers.google.com/drive/web/
manage-uploads#resumable that you should refer to if you write your
own client implementation. The main features are support for a range
header in PUT requests, which allows you to specify the piece of the upload
being supplied in the request, and the ability to interrogate how much of
the data has been received. A partial upload is achieved by including the
Content-Range header as shown here:
PUT {session_url} HTTP/1.1
Authorization: your_auth_token
Content-Length: 524288
Content-Type: application/octet-stream
Content-Range: bytes 0-524287/2000000
This allows a large file to be uploaded in chunks rather than a single large
HTTP request, which can be unreliable. If the final size is unknown, you
can use “ * ” instead of a number. To discover how much of the upload has
been received, you PUT a 0 byte range and the server responds with a Range
header indicating the range that has been received.
PUT {session_uri} HTTP/1.1
Authorization: your_auth_token
Content-Length: 0
Content-Range: bytes */*
Search WWH ::




Custom Search