Example #1
0
 public void Upload_file()
 {
     try
     {
         AWS_connten_class ceph_connten = new AWS_connten_class();
         AmazonS3Client    ceph_client  = ceph_connten.Aws_connten();
         Run(ceph_client).Wait();
     }
     catch (Exception Error)
     {
         Console.WriteLine("Upload Error: {0}", Error.Message);
     }
 }
Example #2
0
        public static void Show_All_Bucket()
        {
            try
            {
                AWS_connten_class ceph_connten = new AWS_connten_class();
                AmazonS3Client    ceph_client  = ceph_connten.Aws_connten();
                var getListBucketsTask2        = ceph_client.ListBucketsAsync();

                foreach (S3Bucket bucket in getListBucketsTask2.Result.Buckets)
                {
                    Console.WriteLine("BuckerName: {0}, Create Time: {1}", bucket.BucketName, bucket.CreationDate);
                }
            }
            catch (AmazonS3Exception Error)
            {
                Console.WriteLine("Error: {0}", Error.Message);
            }
        }