This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Support adding files using filestore#843
Open
skeary-immt wants to merge 1 commit intoipfs-inactive:masterfrom
Open
Support adding files using filestore#843skeary-immt wants to merge 1 commit intoipfs-inactive:masterfrom
skeary-immt wants to merge 1 commit intoipfs-inactive:masterfrom
Conversation
Author
|
Oh, I just realised there is another PR #564 that appears to try and solve this issue too.... I'll leave this open as the approaches are a bit different so it may be worth reviewing my changes to see how it compares and whether it is the basis of something better or not. (I'm new to IPFS so could quite easily be missing something in what I've done...) |
Contributor
|
@skeary-immt this LGTM on the surface - is there any chance we can get a test? |
|
would it make sense to make sending the header conditional on |
Contributor
|
@alanshaw What's all needed for the --nocopy functionality to get fully implemented? I'd really love to see this functionality as part of this library, but I imagine there's a few more things that need to happen for this to become a reality. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
Here is a small change to support adding files using the filestore in go-ipfs via the HTTP API.
As described in #562, In order to use the filestore, an
Abspathheader must be specified which indicates the full path of the file in the local file system. This change provides a way to specify this header by using client code of the form:Based on my testing, when using the updated code, and specifying the
abspathandnocopyoptions, the go-ipfs daemon then uses the filestore for the added file.I'm not sure if the best approach but wanted to create the pull request for consideration. I'm happy to update to an alternative approach if there is a better way. I think an update would also need to be done to the IPFS API spec but I can later do that if it's thought this approach has merit.
Thanks,
Simon