Encapsulates the information needed to provide transfer progress to subscribers of the Put Object Event.
Inheritance: Amazon.S3.Model.TransferProgressArgs
 void OnUploadProgressEvent(object sender, UploadProgressArgs e)
 {           
     if(e.PercentDone>1)
     {
         currentStatus = e.PercentDone;
     }
     if (e.PercentDone == 100)
     {
         TransferUtilityUploadRequest c = sender as TransferUtilityUploadRequest;              
         string filePath = "https://s3.amazonaws.com/"+ExistingBucketName+"/" + c.Key;
      //   LogLocalStorage(filePath,c.Key);
     }           
 }
 /// <summary>
 /// Causes the UploadProgressEvent event to be fired.
 /// </summary>
 /// <param name="progressArgs">Progress data for the file being uploaded.</param>
 internal void OnRaiseProgressEvent(UploadProgressArgs progressArgs)
 {
     AWSSDKUtils.InvokeInBackground(UploadProgressEvent, progressArgs, this);
 }
 // This gets called as bytes are written to the request stream.  The sender is the TransferUtilityUploadRequest
 // that was used to start the upload. The UploadProgressArgs contains the total bytes to be transferred and how many bytes
 // have already been transferred.
 private void uploadFileProgressCallback(object sender, UploadProgressArgs e)
 {
     updateProgressBar(this._ctlFileProgressBar, 0, e.TotalBytes, e.TransferredBytes,
         this._ctlFileTransferLabel, "Bytes", null);
 }
 private void UploadFileProgressCallback(object sender, UploadProgressArgs e)
 {
 }
示例#5
0
 void uploadRequest_UploadProgressEvent(object sender, UploadProgressArgs e)
 {
     Console.WriteLine("{0}/{1}", e.TransferredBytes, e.TotalBytes);
     Progress = e.PercentDone;
 }
示例#6
0
 private void UploadProgressEvent(object sender, UploadProgressArgs e)
 {
     if (this.LogProgress)
     {
         _Log.Verbose("{0} ({1}/{2})", this.GetPercent(e).ToString("N2") + "%", (e.TransferredBytes / 1000).ToString("N0"), (e.TotalBytes / 1000).ToString("N0"));
     }
 }
 /// <summary>
 /// Causes the UploadProgressEvent event to be fired.
 /// </summary>
 /// <param name="progressArgs">Progress data for the file being uploaded.</param>        
 internal void OnRaiseProgressEvent(UploadProgressArgs progressArgs)
 {
     AWSSDKUtils.InvokeInBackground(UploadProgressEvent, progressArgs, this);
 }
示例#8
0
 internal void UploadProgressEvent(object sender, UploadProgressArgs e)
 {
     _logger.Info(sender.ToString() + " -> " + e.TransferredBytes);
     var progressReport = new TaskProgressReport
     {
         Name = _name,
         PercentComplete = e.PercentDone,
         CurrentStep = e.TransferredBytes,
         TotalSteps = e.TotalBytes
     };
     
     _progress.Report(progressReport);
 }
示例#9
0
 static void uploadRequest_UploadPartProgressEvent(object sender, UploadProgressArgs e)
 {
     // Process event.
     //Console.WriteLine("{0}/{1} " +  e.TransferredBytes + " " + e.TotalBytes);
 }
示例#10
0
        private void Request_UploadProgressEvent1(object sender, UploadProgressArgs e)
        {
            // Değerlerin Açıklamaları :
            // e.TransferredBytes   : Transferi Gerçekleşen Dosya Boyutu (Byte)
            // e.TotalBytes         : Toplam Transfer Gerçekleşcek Dosya Boyutu (Byte)
            // e.PercentDone        : Transfer Gerçekleşme Yüzdesi (%)
            // e.FilePath           : Transfer Edilen Dosyanın Lokal Yolu

            // Dosya Yükleme gelişmelerini label'a yazdırıyoruz
            lblUploadStatus.Text = e.TransferredBytes + " / " + e.TotalBytes;
            txtUploadFileNameStatus.Text = e.FilePath + " Yükleniyor.";
            prgUploadStatus.Value = e.PercentDone;
        }
示例#11
0
文件: s3copy.cs 项目: karo-jp/s3copy
 private void uploadFileProgressCallback(object sender, UploadProgressArgs e)
 {
     Console.WriteLine("\x1b[2A[{0}/{1}]", e.TransferredBytes, e.TotalBytes);
     //updateProgressBar(this._ctlFileProgressBar, 0, e.TotalBytes, e.TransferredBytes,
        //     this._ctlFileTransferLabel, "Bytes", null);
 }
 public  async void OnUploadProgressEvent(object sender, UploadProgressArgs e)
 {
     if (e.PercentDone > 1)
     {
       //  progressbar1.Value = e.PercentDone;
     }
     if (e.PercentDone == 100)
     {
        // TransferUtilityUploadRequest c = sender as TransferUtilityUploadRequest;
       //  string filePath = "https://s3.amazonaws.com/" + ExistingBucketName + "/" + c.Key;
         await dummy();
         //   LogLocalStorage(filePath,c.Key);
     }
 }
 private void uploadFileProgressCallback(object sender, UploadProgressArgs e)
 {
     Console.WriteLine("Total bytes: {0} - Total sent: {1}", e.TotalBytes, e.TransferredBytes);
 }
        public void OnUploadProgressEvent(object sender, UploadProgressArgs e)
        {
            var currentobject = sender as Amazon.S3.Transfer.TransferUtilityUploadRequest;
            var s = patientList.Where(p => p.Image1.Name == currentobject.Key).FirstOrDefault();
            if (s != null)
            {
                if (e.PercentDone > 1)
                    s.Image1.Status = e.PercentDone;// +"%";
                if (e.PercentDone == 100)
                {
                   // LogREST.LogEvent("UploadEvent","File +"s.Image1.Name+" uploaded.", app.Username);
                    //LogREST objlog=new  LogREST();
                    LogREST.LogEvent("UploadCompleted", "File " + s.Image1.Name + " uploaded.", app.Username);
                    CreatePatient(s);
                    s.Image1.UploadEndtime = DateTime.Now;
                    s.Image1.Status = e.PercentDone;
                    EndTime = DateTime.Now.ToString();

                }

            }
        }