Photo Upload to Server code correction, added image conversion inside Main class.