I uploaded a jpg image on ipfs using infura API and ipfs-http-client. The file was taken from input with type=file. The event listner was onchange.
// imports