Closed ramxis closed 6 years ago
The /files
methods as well as other stateful portions of the IPFS RPC API are not supported via the Infura endpoint. My suggestion would be to use some of the other write RPCs like /add
or /object/put
and keep track of hashes and other content identifiers as needed. We've recently published documentation on the subset of the Ethereum and IPFS APIs that our backend supports: https://infura.io/docs/.
Hi
I keep getting the error "SyntaxError: Unexpected token < in JSON at position 0" when using ipfs.files.write() with Infura Node. Here Is my code: ipfs = new IPFS({ host: 'ipfs.infura.io', port: 5001, protocol: 'https' }); const data = "Initializing Sensor and Shipping data logging for package Nr." + trackingNr.toString() + "\n"; const buffer = Buffer.from(data,'utf-8');
This code was working perfectly about a month ago. Why did this code suddenly stopped working? Any help will be greatly appreciated.