Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Support wrap-with-directory Option #176

Open
channprj opened this issue Apr 17, 2019 · 5 comments
Open

Support wrap-with-directory Option #176

channprj opened this issue Apr 17, 2019 · 5 comments
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature

Comments

@channprj
Copy link

Example

func Wrap(enabled bool) ipfs.AddOpts {
	return func(rb *ipfs.RequestBuilder) error {
		rb.Option("wrap-with-directory", enabled)
		return nil
	}
}
@channprj channprj changed the title Feature Request - Support wrap-with-directory Option Support wrap-with-directory Option Apr 17, 2019
@Stebalien Stebalien added exp/novice Someone with a little familiarity can pick up kind/enhancement A net-new feature or improvement to an existing feature help wanted Seeking public contribution on this issue labels Apr 17, 2019
@Stebalien
Copy link
Member

FYI, you might want to try the new https://github.com/ipfs/go-ipfs-http-client instead. It's not quite stable but has more features.

@channprj
Copy link
Author

channprj commented Apr 22, 2019

@Stebalien Thanks. ☺️ May I ask what is different between go-ipfs-api and go-ipfs-http-client? Can I use the -w option?

@Stebalien
Copy link
Member

Stebalien commented Apr 22, 2019

@Stebalien Thanks. relaxed May I ask what is different between go-ipfs-api and go-ipfs-http-client?

go-ipfs-http-client is intended to replace this library.

Can I use the -w option?

With this library, you'll have to add that option. With go-ipfs-http-client, you'd call:

Unixfs().Add(ctx, files.NewMapDirectory(map[string]files.Node{
  "filename": files.NewReaderFile(myFile)
})

@channprj
Copy link
Author

@Stebalien Thank you. I'll try it ASAP. 🚀

@susarlanikhilesh
Copy link

I think someone already raised PR. I think this can be linked with the PR.

#294

@lidel lidel reopened this Sep 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants