I was making solidity drive app using the traffic react box.
Drag the file to your browser to upload the file to ipfs and attempt to save the returned hash value by calling the deployed smart contact.
When the file is decried, the error 'POST http://localhost:5001/api/v0/add?stream-channels=true 403 (Forbidden)' is returned.
I need help with how to fix it.
// here is my onDrop Event Code
onDrop = async (file) => {
try {
const {contract, accounts} = this.state;
const stream = fileReaderPullStream(file);
const result = await ipfs.add(stream);
const timestamp = Math.round(+new Date() / 1000);
const type = file.name.substr(file.name.lastIndexOf(".")+1);
let uploaded = await contract.methods.add(result[0].hash, file.name, type, timestamp).send({from: accounts[0], gas: 300000})
console.log(uploaded);
this.getFiles();
} catch (error) {
console.log(error);
}
};