Amazon Simple Storage Service
Developer Guide (API Version 2006-03-01)

Track Multipart Upload Progress

The low-level multipart upload API provides an event, UploadPartRequest.StreamTransferProgress, to track the upload progress.

The event occurs periodically and returns multipart upload progress information such as the total number of bytes to transfer, and the number of bytes transferred at the time event occurred.

The following C# code sample demonstrates how you can subscribe to the StreamTransferProgress event and write a handler.

UploadPartRequest uploadRequest = new UploadPartRequest { // provide request data. }; uploadRequest.StreamTransferProgress += new EventHandler<StreamTransferProgressArgs>(UploadPartProgressEventCallback); ... public static void UploadPartProgressEventCallback(object sender, StreamTransferProgressArgs e) { // Process event. Console.WriteLine("{0}/{1}", e.TransferredBytes, e.TotalBytes); }