Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support --output-enc cbor in dag get command #8085

Closed
tysonzero opened this issue Apr 22, 2021 · 4 comments
Closed

Support --output-enc cbor in dag get command #8085

tysonzero opened this issue Apr 22, 2021 · 4 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@tysonzero
Copy link

This would mirror --input-enc cbor in dag put command.

Currently inputting cbor files into ipfs is easy, but getting them back out seems difficult.

@tysonzero tysonzero added the kind/enhancement A net-new feature or improvement to an existing feature label Apr 22, 2021
@welcome
Copy link

welcome bot commented Apr 22, 2021

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@aschmahmann
Copy link
Contributor

This seems doable and somewhat useful since it does a path traversal before returning the data, but generally dealing with binary data on the CLI/HTTP API is a bit of a pain unless the data is treated like a file/request body.

My guess is that doing ipfs block get will handle the job most of the time (and ipfs resolve can be used for path traversal when needed).

@tysonzero
Copy link
Author

Ah yes ipfs block get seems equivalent to ipfs dag get --output-enc cbor.

Similarly ipfs block put --format cbor seems equivalent to ipfs dag put --input-enc cbor.

Leaving the issue open as it seems like it'd be more consistent to have it anyway to mirror dag put, but that solves my short term needs.

@aschmahmann
Copy link
Contributor

aschmahmann commented Sep 27, 2021

@tysonzero transcoding via ipfs dag get is now supported by #8440. Note the go-ipfs release including this change will include a number of changes to the ipfs dag API that you'll want to take into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants