diff --git a/core/commands/add.go b/core/commands/add.go index 814afc9df..21978af1b 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -35,6 +35,26 @@ var AddCmd = &cmds.Command{ Adds contents of to ipfs. Use -r to add directories. Note that directories are added recursively, to form the ipfs MerkleDAG. +`, + LongDescription: ` +Adds contents of to ipfs. Use -r to add directories. +Note that directories are added recursively, to form the ipfs +MerkleDAG. + +The wrap option, '-w', wraps the file (or files, if using the +recursive option) in a directory. This directory contains only +the files which have been added, and means that the file retains +its filename. For example: + + > ipfs add example.jpg + added QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH example.jpg + > ipfs add example.jpg -w + added QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH example.jpg + added QmaG4FuMqEBnQNn3C8XJ5bpW8kLs7zq2ZXgHptJHbKDDVx + +You can now refer to the added file in a gateway, like so: + + /ipfs/QmaG4FuMqEBnQNn3C8XJ5bpW8kLs7zq2ZXgHptJHbKDDVx/example.jpg `, },