public async void InitiateFileUploading()
        {
           StorageFolder picturesFolder = KnownFolders.PicturesLibrary;
           // StorageFolder picturesFolder = ApplicationData.Current.LocalFolder;
          //  List<string> latestfiles =await UploadRequired(picturesFolder);
           // if (latestfiles != null)
           progressbar1.Value = 30;
            bool flag= await UploadRequired(picturesFolder);
            if (flag)
            {
              //  if (latestfiles.Count > 0)
              //  {
                    IReadOnlyList<StorageFile> files = await picturesFolder.GetFilesAsync();
                    string bucketname = "TestingUploadS3";
                    foreach (var file in files)
                    {
                         progressbar1.Value = 0;
                         AmazonFileBucketTransferUtil uploadTG = new AmazonFileBucketTransferUtil(bucketname, "key" + Guid.NewGuid().ToString(), file.Path);

                         currentfile.Text = "Currently Uploading file: " + file.Name + ". Completed " + uploadTG.currentStatus.ToString() + "%";
                         await uploadTG.UploadFile(file.Name, file);
                         progressbar1.Value = uploadTG.currentStatus;                       
                    }                    
                    currentfile.Text = "All files are successfully uploaded";
              //  }
            }
        }
        private async Task AmazonUploadFileTransfer(IReadOnlyList<StorageFile> file)
        {
            // AmazonFileBucketBackground uploadBG = new AmazonFileBucketBackground("com.mf.carl-prototype","key"+Guid.NewGuid().ToString(),"");
            //  await uploadBG.UploadFile(file);

            AmazonFileBucketTransferUtil s3FileBucket;
            BasicAWSCredentials basicAwsCredentials = new BasicAWSCredentials("AKIAIVMK5XV3GURYM7ZA", "9Xgy0PwXhz6sjL3hS9QUIHr/SsJIKNxBdNlCyJh1");
            foreach (var f in file)
            {
                s3FileBucket = new AmazonFileBucketTransferUtil("com.mf.carl-prototype", Guid.NewGuid().ToString(), "");
                await s3FileBucket.UploadFile(Guid.NewGuid().ToString(), f);
            }
        }
        private async Task AmazonUploadFile(IReadOnlyList<StorageFile> files)
        {
            string bucketname = "TestingUploadS3";
            foreach (var file in files)
            {
                AmazonFileBucketTransferUtil uploadTG = new AmazonFileBucketTransferUtil(bucketname, "key" + Guid.NewGuid().ToString(), file.Path);
                await uploadTG.UploadFile(file.Name, file);
               // await uploadBG.UploadFile(files);
            }

            //AmazonFileBucketAsync s3FileBucket;
            //BasicAWSCredentials basicAwsCredentials = new BasicAWSCredentials("AKIAIVMK5XV3GURYM7ZA", "9Xgy0PwXhz6sjL3hS9QUIHr/SsJIKNxBdNlCyJh1");
            //foreach (var f in file)
            //{
            //    s3FileBucket = new AmazonFileBucketAsync("com.mf.carl-prototype", Guid.NewGuid().ToString(), "");
            //    await s3FileBucket.UploadFile(basicAwsCredentials, Guid.NewGuid().ToString(), f);
            //}
        }