const projectId = process.env.PROJECTKEY
const projectSecret =process.env.SECRETKEY
const auth = 'Basic' + Buffer.from(projectId + ":" + projectSecret).toString('base64')
const client = IPFSHTTPClient({
host:'infura-ipfs.io',
port:5001,
protocol:'https',
headers:{
authorization: auth
}
})
i removed headers object and then got error- project id required
You need to add a space to Basic.
Modified code: