I am digging into ipfs field in order to start a NFT project so that I am working with frontend with ipfs-http-client npm package (npm i ipfs-http-client).
My simple test code is like below:
const { create } = require('ipfs-http-client')
const ipfsClient = create("https://ipfs.infura.io:5001/api/v0")
const cid = await ipfsClient.add(urlSource("https://camo.githubusercontent.com/e92540c54c9b47f684b0e4dd5442ebe20ddbbe2e9699c29ce8400c055fa46e6a/68747470733a2f2f697066732e696f2f697066732f516d65364b4a644b637038355459624c78754c56376f517a4d694c72656d4437484d6f584c5a456d676f36526e682f6a732d697066732d737469636b65722e706e67"))
//https://ipfs.io/ipfs/QmUQeyhy7yY9yZUXKbKLCnPAoGKCeuhH3XxzprcJfYiz1h
So far so good without any problem and the data is accesable on ipfs network. The question of mine is very conceptual and fundamental I believe.
Apparently, the image uploaded to ipfs is stored in the ipfs nodes. And the image will be accessible as long as there is at least one node holding the image data. or we will need to pin it. Otherwise, the data will be no longer seen. And I found the article from the following link saying that the add() execution with default pin with infura API. I am not sure if it is correct because I event does not provide any infura API secret key for this operation. Or is it a free service?
How to pin a hash for IPFS through Infura's gateway using ipfs-http-client API