/// <summary> /// Stores a file passed in through an IO stream. /// </summary> /// <param name="fileName">Name of the file</param> /// <param name="path">Additional path to store the file in</param> /// <param name="stream">Data for the file</param> /// <param name="parameters">Extra meta data for this file</param> /// <param name="firstChunk">Is the first chunch of data</param> /// <param name="lastChunk">Is the last chunch of data</param> void IUploadService.StoreFileAdvanced(string fileName, string path, System.IO.Stream stream, string parameters, bool firstChunk, bool lastChunk) { string uniqueName = Guid.NewGuid().ToString() + Path.GetExtension(fileName).ToLower(); var currFile = new FileTransferData { Name = uniqueName, TotalTransferred = 0, FileSize = stream.Length }; this.WebCache[this.containerName + WEB_CACHE_KEY] = currFile; cfConnection.AddProgressWatcher(this.fileTransferProgress); cfConnection.PutStorageItemAsync(containerName, stream, uniqueName); }