問題
コマンドラインを使用して、ドキュメントの作成時に 1 つまたは複数の添付ファイルを添付できるようにしたいと考えています (以下を参照)。これを Futon (Couchbase) でのみ機能させることができますが、ドキュメントが既に作成されている必要があります。
私は次のことを試しました:
curl -X PUT 'http://username:password@localhost:5984/client_info'
curl -X POST 'http://username:password@localhost:5984/client_info' -H 'Content-Type: application/json' -d '{"client_type": "Private", "client_name": "John Doe","client_email": "john@doe.com","client_city": "Toronto","created_at": "2011-09-06 12:45:03","expires_at": "2012-01-01 00:00:00", "_attachments": {
"test01.jpg": {
"content_type": "image/jpeg",
"length": 30189
}
}
}'
これにより、次のエラーが発生するだけです。
{"error":"unknown_error","reason":"function_clause"}
ありがとう