justicenode / files_external_ipfs

Nextcloud App to add ipfs external storage support
GNU Affero General Public License v3.0
67 stars 9 forks source link

Read files with ipfs CLI commands #2

Closed zicmama closed 4 years ago

zicmama commented 4 years ago

Yahoo!! I was expecting your App for long. I have just installed it. Added a file to my new storage. All seems OK.

I used "nextcloud" as FolderName

What would be the "ipfs get" command to read the file from CLI?

zicmama commented 4 years ago

Cannot find any filenames in pin ressources

for link in $(ipfs pin ls | awk '{print $1}'); do ipfs ls $link; done
justicenode commented 4 years ago

ipfs files ls /nextcloud ipfs files stat /nextcloud/filename hope this helps.

zicmama commented 4 years ago

Thanks, I can get file hash in 'stat'. I wonder how "ipfs files" makes files visible and shared with other ipfs nodes?

justicenode commented 4 years ago

As far as I've understood the same way all other files work. It just adds a layer above that, that allows for location based access to files like in other filesystems.