From 2f6f0f91c837fb5b221d621e36c51c147e247853 Mon Sep 17 00:00:00 2001 From: Dylan Powers Date: Fri, 19 Jun 2015 16:59:23 -0700 Subject: [PATCH] Examples for object put License: MIT Signed-off-by: Dylan Powers --- core/commands/object.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/core/commands/object.go b/core/commands/object.go index e522a1eb2..a93f32346 100644 --- a/core/commands/object.go +++ b/core/commands/object.go @@ -305,6 +305,26 @@ Data should be in the format specified by the --inputenc flag. --inputenc may be one of the following: * "protobuf" * "json" (default) + +Examples: + + echo '{ "Data": "abc" }' | ipfs object put + +This creates a node with the data "abc" and no links. For an object with links, +create a file named node.json with the contents: + + { + "Data": "another", + "Links": [ { + "Name": "some link", + "Hash": "QmXg9Pp2ytZ14xgmQjYEiHjVjMFXzCVVEcRTWJBmLgR39V", + "Size": 8 + } ] + } + +and then run + + ipfs object put node.json `, },