5.1

Table Of Contents
...
name="Ubuntu Template"
id="urn:vcloud:vapptemplate:268"
href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-268"
type="application/vnd.vmware.vcloud.vAppTemplate+xml" ... >
...
<Files>
...
<File
size="1950489088"
bytesTransferred="500000000"
name="disk0.vmdk">
<Link
rel="upload:default"
href="https://vcloud.example.com/transfer/.../disk0.vmdk"/>
</File>
</Files>
...
</VAppTemplate>
Using Ranged PUT requests to Complete a Partial Upload
You typically need ranged PUT requests for very large uploads, especially when network bandwidth or latency
might cause the operation to time out.
If the response to an upload progress request indicates that the upload terminated before it was complete, you
can use the size and bytesTransferred values from the response to construct a ranged PUT request of the
remaining contents, as shown in “Example: Ranged PUT Request to Complete a Partial Upload,” on
page 65.
Procedure
1 Retrieve the VAppTemplate and find the File element that references the partially uploaded file.
2 Make a PUT request that specifies a Content-Range and Content-Length and includes the serialized
contents of the range.
For Content-Range, specify the value of the File element's bytesTransferred attribute for the low end of
the range and the value of its size attribute for the high end of the range. For Content-Length, subtract
the value of the File element's bytesTransferred attribute from the value of its size attribute.
Example: Ranged PUT Request to Complete a Partial Upload
The following request completes the upload of the file disk0.vmdk shown in this fragment of a VAppTemplate.
<VAppTemplate
... >
...
<Files>
...
<File
size="1950489088"
bytesTransferred="500000000"
name="disk0.vmdk">
...
</File>
</Files>
...
</VAppTemplate>
Chapter 4 Provisioning an Organization
VMware, Inc. 65