If I make a desktop application, is there any way to download a file from IPFS without asking users to install and run the IPFS daemon? I’d like to take advantage of IPFS without asking users to get through the hassle of running the daemon, so I was wondering if there is any library that could replace the daemon to download a file.
Your application can come bundled with an IPFS daemon, and start it when your application is started. That is how Orbit works when launched as a standalone electron app.
Your application can come bundled with an IPFS daemon
You can use a bundled IPFS with any language, using the HTTP api that IPFS provides. There exist libraries for interfacing with the IPFS HTTP API comfortably in many languages: https://github.com/ipfs/ipfs#api-client-libraries
As said above, you need your own node bundled with your software; that’s what ipget is doing, for example.
And of course, you can always download from an exit node, e.g.
curl -o /path/to/downloadedFile https://ipfs.io/ipfs/ipfsHash, but that’s probably not what you’re looking for.
A temporary work-around for something that only has access to HTTP and unable to run a js/go-ipfs daemon as well is to use the public gateways that are available via ipfs.io. So if you have the hash
QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T and want to get the file
readme from there, you can do