From the VMware vCloud Director API Documentation Center, I am trying to Upload an OVF Package to Create a vApp Template, There are 5 steps/Procedures as listed below:
1) Initiating the OVF Upload 2 Retrieving the Upload URL for the OVF Descriptor
3 Uploading the OVF Descriptor
4 Retrieving Additional Upload URLs
5) Uploading Referenced Files
All the above steps work fine, and I am able to upload the the vapp template on the vcloud director.
But when I tried Using Ranged PUT requests to Complete a Partial Upload it uploads the complete file.
Request Headers:
{"x-vcloud-authorization": <session_token>, "Content-Length": <size of the file>, "Content-Range": bytes 0-10000/58358272, "Range": bytes=0-10000}
Request Body: As I am trying this from postman selecting binary and choosing the vmdk file.
With the above request I get 200 Response status code, empty response body, and I see the template in ready state in the vCloud director. It uploaded the file completely.
I have also tried adding Request Headers:
{"x-vcloud-authorization": <session_token>, "Range": bytes=0-10000}
and
{"x-vcloud-authorization": <session_token>, "Content-Length": <size of the file>, "Content-Range": bytes 0-10000/58358272}
But no Joy, Can someone please help me to understand what I am doing wrong?