Store file extension

Hi there!

I’ve been trying to store docx and pdf files on the IPFS network.
My question is that is there any way to store the extension of the uploaded file? Or how should I know what is the type (pdf or docx) of the downloaded file?

Thank you for your help!

You can do a couple things:

You can construct a URL that points to the file and contains the filename:

Or, you can wrap the file (ipfs add -w) and construct a URL with the path to the file:


I am not that expert, but I saw on the documentation that there should be a meta object somewhere, and I read they were encouraging developers to use that particular field for additional informations. Maybe I got it wrong…

You can also use MFS (Mutable File System)

1 Like