I can't upload the sample accounts.json file

Hello I'm new in Elastic.

I'm using Elastic from a Mac. I want to upload de account.json file to elasticsearch with the following command as the documentation says.

_curl -H "Content-Type: application/json" -XPOST 'localhost:9200/bank/account/bulk?pretty&refresh' --data-binary "@accounts.json"

But I get the following message

Warning: Couldn't read data from file "accounts.json", this makes an empty
Warning: POST.
{
"error" : {
"root_cause" : [
{
"type" : "parse_exception",
"reason" : "request body is required"
}
],
"type" : "parse_exception",
"reason" : "request body is required"
},
"status" : 400
}

What I'm doing wrong?

This warning is coming from the curl command - it cannot read the "accounts.json" file.
That probably means that are running curl from a different directory to the one that has the file.

Hello Tim!

Thanks for your reply! Exactly that was the problem.

Thanks so much!

Regards!!