ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
16.09k stars 3.01k forks source link

indicate filename/mime-type to ipfs add -w #1055

Open Fil opened 9 years ago

Fil commented 9 years ago

doing ipfs add -w <( curl http://ipfs.io/docs/commands/ )

would like to be able to do something like: ipfs add -w --filename=commands.html <( curl http://ipfs.io/docs/commands/ )

or ipfs add -w --mime-type=text/html <( curl http://ipfs.io/docs/commands/ )

Kubuxu commented 7 years ago

Currently it isn't possible directly. You can do it by either creating desired directory structure in file-system add adding with -w or using files API:

HASH=$(ipfs add -q <( curl http://ipfs.io/docs/commands/ ))
ipfs files mkdir -p /tmp/randomname
ipfs files cp /ipfs/$HASH /tmp/randomname/commands.html
ipfs files stat --hash /tmp/randomname
lizelive commented 2 years ago

is this still not possible?