private void SaveImageToS3()
        {
            try
            {
                var picture = new S3PictureEntity
                {
                    FileName     = lblLoadPictureFromLocal.Text,
                    S3Image      = loadedPictureBox.Image,
                    SafeFileName = lblLoadPictureFromLocal.Text
                };

                var key = S3Library.SaveImageToS3(CurrentConnectionProfile, picture);

                UpdateLoadedS3Image(CurrentConnectionProfile,
                                    new S3MediaEntity()
                {
                    FolderName  = CurrentConnectionProfile.FolderName,
                    BucketName  = CurrentConnectionProfile.BucketName,
                    Key         = key,
                    ProfileName = CurrentConnectionProfile.ProfileName
                });
            }
            catch (Exception exception)
            {
                AddUserMessage(exception.Message);
            }
        }
Ejemplo n.º 2
0
 public void CopyToBucketTest()
 {
     // Personal
     Assert.IsTrue(S3Library.CopyToBucket("", "", RegionEndpoint.APSoutheast2, "", "name", "value"));
     // Sandbox
     Assert.IsTrue(S3Library.CopyToBucket("", "", RegionEndpoint.APSoutheast2, "", "name", "value"));
 }
 private Bitmap GetS3Media(S3ConnectionProfileEntity currentConnectionProfile, S3MediaEntity currentS3MediaSelected)
 {
     try
     {
         return(S3Library.GetS3Media(currentConnectionProfile, currentS3MediaSelected));
     }
     catch (Exception exception)
     {
         AddUserMessage(exception.Message);
         return(null);
     }
 }