aepp-prototypes icon indicating copy to clipboard operation
aepp-prototypes copied to clipboard

Use IPFS to store files in aepp-aexistence

Open emil-apeunit opened this issue 8 years ago • 1 comments

Target

Use IPFS to store files

Current State

Currently if a user chooses to upload an image we send the image to our api and store the image on our server. The filename then is the sha256 hash of the file.

What we want

Store the file on an ipfs node instead

What to do

  • When a user inputs a file send it from frontend to an IPFS node directly
    • Do we need to set up an IPFS node or can we use infura for example?
    • The displayed image in the chat bubble must either come from ipfs or from the file stored in frontend
  • The returned IPFS Hash needs to be stored in frontend to be later sent to the contract
  • The usual flow continues where the user inputs a comment
  • When the notarize method on the contract is called we need to send an additional parameter with the ipfsHash
    • This is needed to be able to display the image later
  • The Proof-Contract is already altered to take the ipfHash argument
  • The Pages to display the list of proofs or a single proof must now read the ipfs hash from the contract and display the image accordingly

emil-apeunit avatar Sep 27 '17 19:09 emil-apeunit

I've created a pull request that addresses this. Please review

ShamariFeaster avatar Oct 27 '17 07:10 ShamariFeaster