2

当我尝试执行 HTTP PUT 请求以在图像 OpenStack 上上传数据文件 .img 时,如下所示:

curl -i -X PUT -H "X-Auth-Token: $Token" -H "Content-Type: application/octet-stream" -d "@/home/nic/cirros-0.3.5-x86_64-disk.img" 192.168.1.107:9292/v2/images/$ID_IMAGE/file

我收到这条消息:

Warning: Couldn't read data from file 
Warning: "/home/nic/cirros-0.3.5-x86_64-disk.img", this makes an empty POST.
HTTP/1.1 204 No Content

我尝试使用绝对路径和相对路径,但它不起作用。

4

0 回答 0