public UploadAssetService(
            string accessToken,
            string fileType,
            string filePath,
            UploadRequestID uploadRequestId,
            Action <AssetUploadPolicy> onSuccess = null,
            Action <Exception> onError           = null
            )
        {
            this.accessToken     = accessToken;
            this.filePath        = filePath;
            this.uploadRequestId = uploadRequestId;
            this.onSuccess       = onSuccess;
            this.onError         = onError;

            var fileInfo = new FileInfo(filePath);

            payload = new PostUploadAssetPolicyPayload
            {
                fileType = fileType,
                fileName = fileInfo.Name,
                fileSize = fileInfo.Length
            };
        }
        static void AssetUpload(
            string accessToken,
            string fileType,
            string filePath,
            UploadRequestID uploadRequestId)
        {
            var fileInfo = new FileInfo(filePath);
            var payload  = new PostUploadAssetPolicyPayload
            {
                fileType = fileType,
                fileName = fileInfo.Name,
                fileSize = fileInfo.Length
            };

            var url = $"{Constants.VenueApiBaseUrl}/v1/upload/venue/{uploadRequestId.Value}/policies";

            Debug.LogFormat("Calling RPC: {0}", url);

            var webRequest = ClusterApiUtil.CreateUnityWebRequest(accessToken, url, UnityWebRequest.kHttpVerbPOST);

            webRequest.downloadHandler = new DownloadHandlerBuffer();
            webRequest.uploadHandler   = new UploadHandlerRaw(Encoding.UTF8.GetBytes(JsonUtility.ToJson(payload)));
            webRequest.SendWebRequest();

            while (!webRequest.isDone)
            {
                Thread.Sleep(50);
            }

            if (webRequest.isNetworkError)
            {
                throw new Exception(webRequest.error);
            }

            var responseText = webRequest.downloadHandler.text;

            Debug.LogFormat("Calling RPC ResponseText: {0}", responseText);
            var policy = JsonConvert.DeserializeObject <AssetUploadPolicy>(responseText);

            var fileBytes = ReadFile(filePath);

            if (policy == null || fileBytes == null)
            {
                throw new Exception("unknown error");
            }

            var form = BuildForm(fileBytes, policy);
            var uploadFileWebRequest = UnityWebRequest.Post(policy.uploadUrl, form);

            uploadFileWebRequest.chunkedTransfer = false;

            uploadFileWebRequest.SendWebRequest();
            while (!uploadFileWebRequest.isDone)
            {
                Thread.Sleep(50);
            }

            if (uploadFileWebRequest.isNetworkError)
            {
                throw new Exception(uploadFileWebRequest.error);
            }

            if (uploadFileWebRequest.isHttpError)
            {
                throw new Exception(uploadFileWebRequest.downloadHandler.text);
            }

            Debug.Log($"Success Upload {policy.fileType}");
        }