MetaData Sharing
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1.5 KiB

Sample structure for sharing file information.

Example object hierarchy

file -> metadata

MetaData Object

secure hash of data list or dict for hashes?

{
	'id': 'uuid',
	'dc:author': 'example author',
	'hashes': [ 'sha256:xxxx' ],
	'hash': 'sha256:xxxx',
	'length': 1234,
	'uri': {
		'https://www.example.com/a/path/filename.txt'
	}
	xxxmetadata
}

Location of file

{
	'id': 'uuid5',
	'uri': [
		'https://example.com/path/to/file',
		'magnet:?xxx',
		'ipfs:xxx'
	]
}

Links to file from FS

hostname + path link to base file

Why not use a file URI w/ host part? There is no UUID host name

How are these versioned? Are they? They need to be, via modified

{
	'hash': 'sha256:xxx',
	'hostname': 'server.example.com',
	'fqpath': '/some/set/directories/and/filename.ext',
	'modified_date': 'iso8601'
}

Archive file listing

link to archive hash list of files name/handle in archive

This is an immutable “fact”, treat it differently?

{
	'archivehash': 'sha256:xxx',
	'files': [
		[ 'archive/path/to/file.ext', 'sha256:xxx' ],
		...
	]
}

Links to file in torrent

Maybe merge torrent into here, as a torrent is really an “archive” of the files, but just w/ a differnt lookup method, via torrent info hash (magnet link) vs file hash.

torrent hash name of file in torrent if multi file torrent

Note: that if the file is in an archive in a torrent, these change be chained.

{
	'filehash': 'sha256:xxx',
	'magnet_link': 'magent:xxx',
	'fqpath': 'archive/path/to/file.ext'
}