Warning: Couldn't read data from file

2.1k Views Asked by At

When i try to do an HTTP PUT request to upload a data file .img on image OpenStack like this:

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

i receive this message:

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

I try to use absolute and relative path but it doesn't work.

0

There are 0 best solutions below