Skip to content

Preserve file name in transfer.sh mode (unencrypted content downloaded from an IPFS gateway) #10

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

Open
aurelg opened this issue Nov 27, 2018 · 0 comments
Labels
good first issue Good for newcomers

Comments

@aurelg
Copy link
Owner

aurelg commented Nov 27, 2018

When no encryption is requested, the content shared with ipfs-wormhole can be retrieved from its IPFS hash and an IPFS gateway (ala transfer.sh). However, such a downloaded file would be named according to its IPFS hash. This is not very convenient.

A solution could be to put the content to send into a temporary directory, which is itself added to IPFS recursively with ipfs add -r. The HTTP link to the gateway could then contain both the IPFS hash of the directory and the real file name to the to allow for a proper naming of the downloaded file.

Two comments about the implementation:

  • A temporary directory cannot be piped into ipfs add as it is the case with the current implementation
  • If the content to send is a file, creating a hardlink in the temporary directory would be fine. If the content to send is a directory, it would first have to be compressed and stored into the temporary directory before the latter is added to IPFS. This requires some additional disk space.
@aurelg aurelg added the good first issue Good for newcomers label Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant