GooglePlayInstant/Editor/QuickDeploy/GcpClient.cs
/// <summary>
/// Sends an HTTP request to GCP to upload the file according to quick deploy configurations, and
/// invokes the handler action on the response.
/// </summary>
/// <param name="postResponseAction">An action to be invoked on the www instance holding the http request
/// once the response to the request to upload the bundle is available</param>
Sends an HTTP request to GCP to upload the file according to quick deploy configurations, and
invokes the handler action on the response.
Sends an HTTP request to GCP to upload the file according to quick deploy configurations and invokes the handler action on the response .
private static void UploadBundleFile(Action<WWW> postResponseAction)
        {
            var uploadEndpoint =
                string.Format("https://www.googleapis.com/upload/storage/v1/b/{0}/o?uploadType=media&name={1}",
                    QuickDeployWindow.Config.CloudStorageBucketName, QuickDeployWindow.Config.CloudStorageObjectName);
            var assetBundleFileBytes = File.ReadAllBytes(QuickDeployWindow.Config.AssetBundleFileName);
            var request =
                SendAuthenticatedPostRequest(uploadEndpoint, assetBundleFileBytes, "application/octet-stream");
            WwwRequestInProgress.TrackProgress(request, "Uploading file to Google Cloud Storage", postResponseAction);
        }
private static void UploadBundleFile ( Action < WWW > postResponseAction ) { var uploadEndpoint = string . Format ( " " , QuickDeployWindow . Config . CloudStorageBucketName , QuickDeployWindow . Config . CloudStorageObjectName ) ; var assetBundleFileBytes = File . ReadAllBytes ( QuickDeployWindow . Config . AssetBundleFileName ) ; var request = SendAuthenticatedPostRequest ( uploadEndpoint , assetBundleFileBytes , " " ) ; WwwRequestInProgress . TrackProgress ( request , " " , postResponseAction ) ; }
Sends an HTTP request to GCP to upload the file according to quick deploy configurations, and
invokes the handler action on the response.
Sends an HTTP request to GCP to upload the file according to quick deploy configurations and invokes the handler action on the response .
// See https://cloud.google.com/storage/docs/uploading-objects
postResponseAction
Action<WWW>
An action to be invoked on the www instance holding the http request
once the response to the request to upload the bundle is available
An action to be invoked on the www instance holding the http request once the response to the request to upload the bundle is available