private static void LoadFile2(ILoadingService context, byte[] data, string fileName) { using (var stream = new MemoryStream(data)) { var meta = new FileMetadata { FileName = fileName, FileSize = data.Length }; var start = DateTime.Now; Console.WriteLine(@"Uploading {0} with a size of {1} bytes @ {2}", meta.FileName, meta.FileSize, start.ToString("HH:mm:ss:ffff", CultureInfo.CurrentCulture.DateTimeFormat)); var request = new FileUploadRequest(meta, stream); var response = context.UploadFile2(request); var taken = DateTime.Now.Subtract(start); Console.WriteLine(@"Uploading {0} has completed in {1}ms with a reponse of {2}", meta.FileName, taken.TotalMilliseconds, response.SessionFileName); } }