private void UploadDroplet() { Uri uri = new Uri(this.Message.UploadURI); Logger.Debug("Staging task {0}: Uploading droplet {1} to {2}", this.TaskId, this.workspace.StagedDroplet, this.Message.UploadURI); DEAUtilities.HttpUploadFile(this.Message.UploadURI, new FileInfo(this.workspace.StagedDropletPath), "upload[droplet]", "application/octet-stream", uri.UserInfo); }
private void SaveBuildpackCache() { try { PackBuildpackCache(); } catch { Logger.Debug("Staging task {0}: Cannot pack buildpack cache", this.TaskId); return; } File.Copy(this.workspace.StagedBuildpackCache, this.workspace.StagedBuildpackCachePath); Uri uri = new Uri(this.Message.BuildpackCacheUploadURI); Logger.Debug("Staging task {0}: Uploading buildpack cache {1} to {2}", this.TaskId, this.workspace.StagedBuildpackCachePath, this.Message.BuildpackCacheUploadURI); DEAUtilities.HttpUploadFile(this.Message.BuildpackCacheUploadURI, new FileInfo(this.workspace.StagedBuildpackCachePath), "upload[droplet]", "application/octet-stream", uri.UserInfo); }