Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Is there a way to upload the Image or the PDF of the Screenshot document mentioned? #7

Closed
pratiksharma1619 opened this issue Sep 4, 2018 · 5 comments
Labels
question Further information is requested

Comments

@pratiksharma1619
Copy link

pratiksharma1619 commented Sep 4, 2018

Is there a way to upload the scanned image or the PDF into the blockchain network? Or we could probably make a hash (like IPFS or so) of the file and put the hash into the blockchain network.

What I saw in submitFairTradeData is that you are inserting the data from your side

@horeaporutiu
Copy link
Contributor

@pratiksharma1619 Thanks for opening this. I will look into this and get back to you.

@pratiksharma1619
Copy link
Author

pratiksharma1619 commented Sep 6, 2018

@horeaporutiu Can Base64 encoding of the image file be a solution for it? What would be its pros and cons if implemented?

@0xthreebody
Copy link

@pratiksharma1619 upload the image to IPFS, post the Hash to blockchain. Note: need to let the IPFS dont delete the file, such as use the "pin" method.

@horeaporutiu
Copy link
Contributor

@jiangfuyao Thanks for the comment. Really good solution.

@pratiksharma1619 Don't think you should use Base64 encoding since you can decode the image. With hashing, you can preserve the integrity of the data, and nobody will know what sort of data is behind the hash.

I have never used IPFS, but seems like it could be a nice solution. Just simply create a field within /submitFairTradeData for documentHash and then just get the hash of the document, and update that field :)

@horeaporutiu
Copy link
Contributor

@pratiksharma1619 This is a good post about the difference between base64 encoding and hashing: https://stackoverflow.com/questions/25058207/what-is-the-main-difference-between-base64-encode-hashing-and-sha1-md5

@ljbennett62 ljbennett62 added the question Further information is requested label Dec 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants