You can send files to Infura's IPFS servers but I don't know about the limits.
How long is it stored for?
What's the size limit?
You can send files to Infura's IPFS servers but I don't know about the limits.
How long is it stored for?
What's the size limit?
Got a reply from an Infura member.
At the moment if you pin objects on their nodes they won't be removed. Unpinned objects are garbage collected when the data store needs to reclaim space.
File size is not explicitly limited but you might encounter gateway timeout for very large files.
While developing a dApp using the infura gateway to ipfs we noticed that files are being removed after ~2 weeks.
I also just did some research there and am pretty sure that I read exactly that somewhere but I can't seem to find the resource anymore...
To overcome the issue of files being removed you can just regularly pin them on a local node to keep them up.
Unfortunately I have no info about file sizes.
Just adding more to the answer by @kai-kälberer.
I recommend using the ipfs-mini
javascript library when writing to ipfs. They have automatic pinning built in, which will allow your ipfs files to persist longer.
Here is a code example of Reading and Writing to IPFS supported by Infura.
import IPFS from 'ipfs-mini'
import isString from 'lodash/fp/isString'
const ipfs = new IPFS({ host: 'ipfs.infura.io', port: 5001, protocol: 'https' })
export async function ipfsGetData (multihash) {
if (!isString(multihash)) {
return new Error('multihash must be String')
} else if (!multihash.startsWith('Qm')) {
return new Error('multihash must start with "Qm"')
}
return new Promise((resolve, reject) => {
ipfs.catJSON(multihash, (err, result) => {
if (err) reject(new Error(err))
resolve(result)
})
})
}
export async function ipfsAddObject (obj) {
const CID = await new Promise((resolve, reject) => {
ipfs.addJSON(obj, (err, result) => {
if (err) reject(new Error(err))
resolve(result)
})
})
console.log('CID:', CID)
return CID
}
According to this recent post by Infura on September 23, 2020: https://blog.infura.io/part-2-getting-started-with-ipfs-on-infura/
Data is currently pinned until it’s been 6 months since it was last used, so as long as you’re accessing your data within that time frame, it’ll be there for you!