2016-08-31 13:33:28 |
George Shuklin |
description |
Following example in the section "Image data" is incorrect:
curl -i -X PUT -H "X-Auth-Token: $token" \
-H "Content-Type: application/octet-stream" \
-d @/home/glance/ubuntu-12.10.qcow2 \
$image_url/v2/images/{image_id}/file
-d option is equal to --data-ascii, which, according to curl man page is:
"When --data is told to read from a file like that, carriage returns and newlines will be stripped out."
This will mange uploaded image.
Proper command line is:
curl -i -X PUT -H "X-Auth-Token: $token" \
-H "Content-Type: application/octet-stream" \
-data-binary @/home/glance/ubuntu-12.10.qcow2 \
$image_url/v2/images/{image_id}/file |
Following example in the section "Image data" is incorrect:
curl -i -X PUT -H "X-Auth-Token: $token" \
-H "Content-Type: application/octet-stream" \
-d @/home/glance/ubuntu-12.10.qcow2 \
$image_url/v2/images/{image_id}/file
-d option is equal to --data-ascii, which, according to curl man page is:
"When --data is told to read from a file like that, carriage returns and newlines will be stripped out."
This will mange uploaded image.
Proper command line is:
curl -i -X PUT -H "X-Auth-Token: $token" \
-H "Content-Type: application/octet-stream" \
--data-binary @/home/glance/ubuntu-12.10.qcow2 \
$image_url/v2/images/{image_id}/file |
|