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

add --nocopy not supported #2856

Closed
MichaelMure opened this issue Jun 8, 2017 · 10 comments
Closed

add --nocopy not supported #2856

MichaelMure opened this issue Jun 8, 2017 · 10 comments
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) need/author-input Needs input from the original author pkg:http-client Issues related only to ipfs-http-client

Comments

@MichaelMure
Copy link
Contributor

Hi,

I'm trying to use the --nocopy option of the filestore through js-ipfs-api but files added this way are stored in the regular blockstore. After a lot of digging I think it's due to how the file is streamed in the http request:

Capture of the multipart/form-data of a request made with the CLI:

 --35471fb491711d32f7a9885e488899d24c6483bd528959cb002c6a6e32b5 
 Abspath: /home/michael/go/src/gx/ipfs/QmaeRR9SpXumU5tYLRkq6x6pfMe8qKzxn4ujBpsTJ2zQG7/go-os-rename/README.md 
 Content-Disposition: file; filename="README.md" 
 Content-Type: application/octet-stream 
  
 # go-os-rename
 ...

Capture of the multipart/form-data of a request made with js-ipfs-api:

--6ezi3e1udjdvx3sly5t01i3sor 
Content-Disposition: file; filename="README.md" 
Content-Type: application/octet-stream 
 
# go-os-rename

The absolute path is missing, so my guess is that the filestore can't file the file on disk and the data is then stored in the regular blockstore. Bad things is that happen silently ...

CC @kevina, is that correct ?

@Kubuxu
Copy link
Member

Kubuxu commented Jun 13, 2017

cc @victorbjelkholm when you got time.

@daviddias
Copy link
Member

@MichaelMure we don't yet support the filestore API from go-ipfs. Wanna help us by taking a stap at it?

» ipfs filestore
USAGE
  ipfs filestore - Interact with filestore objects.

  ipfs filestore

SUBCOMMANDS
  ipfs filestore dups              - List blocks that are both in the filestore and standard block storage.
  ipfs filestore ls [<obj>]...     - List objects in filestore.
  ipfs filestore verify [<obj>]... - Verify objects in filestore.

Use 'ipfs filestore --help' for more information about this command.

@MichaelMure
Copy link
Contributor Author

@diasdavid err, I already have the key api to complete for what I added in go-ipfs some time ago and a whole project to push forward.

I have to prioritize, sorry ...

@obo20
Copy link
Contributor

obo20 commented Apr 30, 2019

@MichaelMure can I ask how you were capturing these requests? I'm attempting to work on a fix for this, but have been running into some strange issues where the go-ipfs daemon seems to accept the nocopy flag / abspath header, and adds the content in a different manner than normal, but this different manner isn't adding it to the filestore.

Being able to capture what's getting sent would help with debugging.

@MichaelMure
Copy link
Contributor Author

@obo20 IIRC I used wireshark

@obo20
Copy link
Contributor

obo20 commented Apr 30, 2019

@MichaelMure thanks for the quick response. One more quick question if you have time. Do you know how you grabbed the headers? I'm able to see my requests, but can't seem to see headers anywhere (for the CLI requests or the http-client requests)

@MichaelMure
Copy link
Contributor Author

Sorry I don't remember, that was 2 years ago, but I suppose you can simply inspect the decoded HTTP section of the packets. Alternatively, you could use tcpdump (something like https://coderwall.com/p/imdadq/view-http-request-headers-with-tcpdump).

@achingbrain achingbrain transferred this issue from ipfs-inactive/js-ipfs-http-client Mar 9, 2020
@achingbrain achingbrain added kind/bug A bug in existing code (including security flaws) exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue P1 High: Likely tackled by core team if no one steps up pkg:http-client Issues related only to ipfs-http-client labels Mar 9, 2020
@achingbrain achingbrain removed the P1 High: Likely tackled by core team if no one steps up label May 7, 2020
@autonome
Copy link
Contributor

Triaged, still a valid request. Not a priority, but would take a PR. If this is a priority for you, share your thoughts on why!

@achingbrain achingbrain added the need/author-input Needs input from the original author label Jun 4, 2020
@achingbrain
Copy link
Member

Closing due to lack of response.

@markg85
Copy link

markg85 commented Mar 9, 2022

Could this be reopened.
I'm adding large files in IPFS and want to keep them as local files. I therefore use --nocopy on the command line, which works.
In js-ipfs this options doesn't seem to exist.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) need/author-input Needs input from the original author pkg:http-client Issues related only to ipfs-http-client
Projects
None yet
Development

No branches or pull requests

7 participants