Protocol for arbitrary metadata?

From @micahredding on Wed Mar 09 2016 22:24:19 GMT+0000 (UTC)

I haven’t seen any docs on this, so I’m assuming this isn’t in place — but is there an established protocol for attaching arbitrary metadata to files? Does ipfs add support any metadata options?


Copied from original issue: https://github.com/ipfs/faq/issues/98

From @RichardLitt on Thu Mar 10 2016 18:56:38 GMT+0000 (UTC)

I’m not sure. You might want to check in github.com/ipfs/specs.

From @noffle on Wed Mar 23 2016 18:20:37 GMT+0000 (UTC)

IPFS stores objects, where files are a data structure on top. (Easy misconception, given the project name :smile:). Take a look at ipfs object --help for some commands that assist in building custom object structures using IPFS merkle dag objects.

Soon we’ll be using a format called IPLD, which will make it easier to describe arbitrary data structures on top of IPFS.

From @whyrusleeping on Wed Mar 23 2016 18:31:25 GMT+0000 (UTC)

Ipfs files currently do have a metadata object, but we havent put a lot of effort into it yet and using it is rather difficult.

That said, the current metadata structure is here: https://github.com/ipfs/go-ipfs/blob/master/unixfs/format.go#L180

Right now it only has fields for a mime type and size, but i think adding arbitrary key/value pairs to that is probably something good to do in the short term (before IPLD is done).

We should also work on exposing that metadata object through ipfs add and friends.