add callbacks for file|photo upload