delegating click event for uploading images