This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
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
Abspath
header 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
abspath
andnocopy
options, 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