예제 #1
0
        // List incomplete uploads on the bucket matching specified prefix
        public static void Run(Minio.MinioClient minio,
                               string bucketName = "my-bucket-name",
                               string prefix     = "my-object-name",
                               bool recursive    = true)
        {
            try
            {
                Console.Out.WriteLine("Running example for API: ListIncompleteUploads");

                IObservable <Upload> observable = minio.ListIncompleteUploads(bucketName, prefix, recursive);

                IDisposable subscription = observable.Subscribe(
                    item => Console.WriteLine("OnNext: {0}", item.Key),
                    ex => Console.WriteLine("OnError: {0}", ex.Message),
                    () => Console.WriteLine("Listed the pending uploads to bucket " + bucketName));

                Console.Out.WriteLine();
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception: {0}", e);
            }
        }