Ipfs How to know the type and name of the file by hash code

ipfs How to know the type and name of the file by hash code

hey

with go-ipfs try ipfs ls see the doc : https://ipfs.io/docs/commands/#ipfs-file-ls

regards

But I didn’t find it,who can tell me ipfs support the function of finding file types?

IPFS, like your filesystem, doesn’t store this information at the moment. It knows whether a something is a directory, regular file, or a symlink but we don’t record the MIME type (we have space, we just don’t currently record it).

So, to find the mime type, you’ll have to fetch the file and then use whatever you usually use on your operating system (on Linux, users usually use the file command).

4 Likes