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

Redirect .ipfs and .ipns files #641

Closed
hazae41 opened this issue Dec 15, 2018 · 7 comments
Closed

Redirect .ipfs and .ipns files #641

hazae41 opened this issue Dec 15, 2018 · 7 comments
Labels
status/deferred Conscious decision to pause or backlog

Comments

@hazae41
Copy link

hazae41 commented Dec 15, 2018

Hello, I recently added to Sweet IPFS a way to "export" an ipfs/ipns hash to a .ipfs/.ipns file (it is just a plain text file with the hash written)

Example:
https://ipfs.eternum.io/ipfs/QmRrNxz28cn4xm8kXHffMNqYqRh2JUPQPvaB3W8ietwrn6

Could you please add a way to redirect .ipfs/.ipns files when accessed from the browser, so IPFS Companion automatically redirect the URL to the hash content

This would be great in order to reference an IPFS content from another IPFS content without needing to download it or suggesting a certain gateway, or even in order to reference a mutable content via .ipns files

Sharing an IPFS content via .ipfs/.ipns files would be like sharing a Torrent via .torrent files

If possible, it would be great to also allow this redirect from any website, not just IPFS gateways. Examples:

https://www.my-website.com/photos/my-cat.ipfs
https://www.my-website.com/links/my-distributed-blog.ipns

And also, if it could support path to a certain file in an IPFS folder
Example: the content of my-cat.ipfs is "Qm.../cats/cat.png" so the browser redirect to /ipfs/Qm.../cats/cat.png

Thanks for your hard work on improving the world ;)

@lidel lidel added the status/deferred Conscious decision to pause or backlog label Jan 7, 2019
@lidel
Copy link
Member

lidel commented Jan 7, 2019

Interesting idea, @hazae41 Is there a reason why separate file extension is used for IPNS?

Note to self: if we add this to Companion, we should also look into registering OS-wide support for .ipfs files via ipfs-desktop.

@hazae41
Copy link
Author

hazae41 commented Jan 15, 2019

I think file extensions should be per protocol since it would tell the user what we are processing, exactly the same way as a URL like "/ipfs/Qm..." describes that we are dealing with an IPFS or IPNS hash

In addition, it will make it easier to sort content and domain names in a file system, without having to look at what's inside.

🔨 I made an userscript for this: https://github.com/RHazDev/ipfs-files.user.js

@lidel
Copy link
Member

lidel commented Jan 16, 2019

Fair enough. I am mostly living in terminal, so may not appreciate how useful this may be to regular users, but see how it makes more sense in the future where other namespaces are added, eg. to have .ipld file and know clicking on it will open IPLD Explorer etc.


@ipfs-shipyard/gui thoughts on this?

tl;dr this is about adding support for .ipfs&.ipns files (plain text with a single IPFS path).

The idea sounds similar to .torrent, but there is no additional metadata involved, which makes it basically a convention for a shareable symlinks to IPFS resources.

Adding support involves ipfs-desktop (registering filetype handler in OS that just redirects to ipfs:// or ipns://) and ipfs-webui ("symlink" support in Files) so I don't feel like it should be adopted without your feedback.

@alanshaw
Copy link
Member

I like this idea!

@hacdias
Copy link
Member

hacdias commented Jan 17, 2019

This is kinda related to what @olizilla, @fsdiogo and I talked about yesterday: I told them the idea of adding support on IPFS Desktop for .ipfs file extensions. But... how is it simpler than sending a CID? Just wondering.

@hazae41
Copy link
Author

hazae41 commented Jan 17, 2019 via email

@lidel
Copy link
Member

lidel commented May 6, 2021

This was stale for a long time, and seems unlikely given that:

  • Is sending .ipfs via email really a thing people would benefit from?
    Sounds like sending a link to https://dweb.link/ipfs/{cid} is way better UX-wise.
  • FYSA we are looking into adding support for _redirect files on gateways, which is more dev-friendly way of doing redirects on the web.

I'm closing this but can reopen if there is an interest in pursuing this.
Please comment if anyone using this: what are your use cases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/deferred Conscious decision to pause or backlog
Projects
None yet
Development

No branches or pull requests

4 participants