curl xput windows Couldn't read data from file
If you really have a file named myFeatures.json
into a folder named path
in the current folder where you're trying to submit curl
, just remove the leading slash from the path.
curl -XPUT "localhost:8983/solr/techproducts/schema/feature-store" --data-binary "@path/myFeatures.json" -H "Content-type:application/json"
On the other hand, try to specify the absolute path to your myFeatures.json
.
curl -XPUT "localhost:8983/solr/techproducts/schema/feature-store" --data-binary "@C:\your\complete\path\myFeatures.json" -H "Content-type:application/json"
I had the same problem, and in my case, it turned out that this was caused by using ~
in my path.