-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add files doesn't show up in IPFS local node #14
Comments
From what I can see, the FileSystemApi implementation is incomplete and for the most part does not uses the /files/ commands. AddFileAsync only adds the file to the node, and returns the FileSystemNode of the file (or directory). You can see that code here, it uses the /add command and not the MFS subsystem api: /files/ It does not actually add it to the MFS files system of the node which might be implemented by a subsequent /files/cp command to hang the file or directory at a specified path. I would be interested in working on FileSystemApi or collaborating with anyone else interested in getting this working as expected |
On a second look, FileSystemApi does not support /api/files at all It has API call to /file/ls which is deprecated which led me to believe that this class was supposed to be talking to the /files api's, it's actually more of a utility class. The entire MFS command set should be implemented. I suspect that MFS was not yet released at the time of FileSystemApi creation. A new API interface and class such as MfsApi should probably be implemented. This work would have to be integrated in net-ipfs-core CoreApi as well |
This is my workaround for now, assuming pFile is a StorageFile object:
|
Sorry, I don't understand if code it's working or not. Can I help? |
await ipfs.Mfs.WriteAsync now provides the desired functionality Close issue @Arlodotexe ? |
I'm new to IPFS development and maybe I'm missing something but I can't make to list files in IPFS client list.
I'm using the following code:
string pFile = @"C:\Users\matte\Desktop\dump_languagefiles.pdf"; var ipfs = new IpfsClient(); AddFileOptions options = new AddFileOptions(); options. Pin = true; options.OnlyHash = false; options. Wrap = false; IFileSystemNode ipfsNode = await ipfs.FileSystem.AddFileAsync(pFile, options, default);
But nothing appears here:
The text was updated successfully, but these errors were encountered: