How to display human-readable file names on legacy browser-based ipfs file explorer

Hello,

I have been trying to understand how to name files and folders in a comprehensive and human-readable way.

In fact, I’m reaorganizing an IPFS database to group files of the same type, and then display the browser-based file explorer view of that folder, rather than providing multiple links. I feel that’s better for UI purposes.

However, though I’ve been able to name the folders as I like, I’m still left with files named after their CIDs:

I know by experience that when uploading an already formated folder from a hard drive, with all the files already named prior to upload on IPFS, they keep their original name when displayed on the ipfs file explorer. (see below the project apollo folder for reference)

Is there a way to rename files as we like in MFS or IPFS so it can be seen on the file explorer after they are added to IPFS or during upload?

Btw, really convenient for browsing purposes that ipfs-cluster lets us name the files while upload (thanks to the -n option), too bad it does not reflect on the file explorer or on IPFS.

How are you creating these folders and putting these files in it? If you put the folder on MFS, you can rename files in it (the CId of the folder will change though).

Hi Hector, thanks for answering.

These files were created a while ago by uploading them to our cluster (ipfs-cluster-ctl add).
A few days ago, I created the FR.L.M.P.1 folder with MFS (ipfs files mkdir) and added the files to this folder (ipfs files cp).

Are you saying there is a way to rename the files once added to MFS ? How can I do so, using the write command ? By reading its description it does not seem to correspond and I’ve not found anything on that matter online.

You use the move command, just like in unix:

ipfs files mv --help

1 Like