client can compress image and upload file