I’m using IPFS service for file storage. From Node.js application I can initialize IPFS_Node and using this Node upload file.
var ipfs = ipfsClient({
// the hostname (or ip address) of the endpoint providing the ipfs api
host: '*****************',
// the port to connect on
port: '443',
// 'api-path': '/api/v0/',
// the protocol, https for security
protocol: 'https',
// provide the jwt within an authorization header
headers: {
authorization:
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ**********************'
}
});
const data = await ipfs.add(file);
console.log(data);
it returns (Object [AsyncGenerator] {} ) empty object