-
Notifications
You must be signed in to change notification settings - Fork 23
return url as AbsPath from WebFile to implement FileInfo #13
Conversation
I don't get where is it use full, I'm working on ipfs/kubo#6065 (like you), personaly I'm close to finish (I'm in trouble with the post run function of add when it is an url because it wait a lot of things that not here.) and I don't need that. |
I'm following the method describe here, which is different than how urlstore works. This PR indirectly adds the |
Ok :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magik6k I think this is the right way to do this but it's kind of weird. Basically, setting AbsPath like this (and tweaking the cmds library to create WebFiles) should make ipfs add --nocopy
magically work with URLs. Does that sound right?
And a third step to set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
(another way to approach this would be to make MultipartReader
just send the URL with type like application/x-url
, and parse that into WebFile
s in MultipartFile
, but that's much more involved change to save a bit of bandwidth between client and daemon)
return url as AbsPath from WebFile to implement FileInfo This commit was moved from ipfs/go-ipfs-files@6b8782d
This PR extends
WebFile
to implementFileInfo
, causing theurl
to be sent in theabspath
header (to be used in subsequent PRs togo-ipfs-cmds
andgo-ipfs
).Towards ipfs/kubo#6065