net::ERR_CONTENT_LENGTH_MISMATCH error while uploading image to IPFS

You need to proxy to localhost:8080 . I have also made a docker image that makes ipfs easy to deploy/use. Check it out: IPFS in Docker with HTTPS