amethyst
amethyst copied to clipboard
Use IPFS for image upload
While I was investigating how the image upload was implemented I noticed it depends on imgur
. Would there be any interest in trying to use an IPFS get/put integration instead? I'd imagine using something like https://github.com/textileio/android-ipfs-lite.
I'm willing to put in some work to do this. Thoughts?
Seconded. Distributed file storage like IPFS and torrents would be preferable to centralized storage.
Nice, I would welcome the implementation.
But wouldn't that require that other clients also support IPFS to show the image?
Yes, like any other integration, clients would have to support the service or protocol that you implement here for them to be interoperable. So far, most clients are enabling support for embedding specific types of URIs, like YouTube videos or Spotify URIs, or HTTP URIs that point to images. This would just be another integration. As more people see the ipfs:// links in their feed, they will probably begin asking their client vendors to support integration.
It could make sense to enable nostr-relays itself to be a storage for large media. All is needed a suitable incentive structure (payments) to make is desireable for node-operators to invest in the resources.
The preferred route would certainly require other clients to handle IPFS content. An incremental step away from fully-centralized hosting would be to use decentralized storage with a centralized IPFS HTTP gateway (e.g. ipfs.io, cloudflare-ipfs, etc). In that scenario, Amethyst could do the IPFS put
but publish the URL to the content from one of the public gateways. Once other clients add support for IPFS, the published URL could be easily switched to ipfs://
.
Edit: Adding a cross-link to a Damus discussion about media uploads.