예제 #1
0
        public async Task GetDownloadUrlAsyncTest()
        {
            // Upload file
            var filePath = FileHelper.TestFilePath;
            var upload   = new FileUpload("image/png", Unique.String + ".png");
            var filename = await upload.UploadFileAsync(filePath);

            // Get download url
            var download = new FileDownload(filename);
            var url      = await download.GetDownloadUrl();

            Assert.IsFalse(string.IsNullOrWhiteSpace(url));
            Console.WriteLine("Download url: {0}", url);
        }
        public async Task GetDownloadUrlAsyncTest()
        {
            // Upload file
            var filePath = FileHelper.TestFilePath;
            var upload = new FileUpload("image/png", Unique.String + ".png");
            var filename = await upload.UploadFileAsync(filePath);

            // Get download url
            var download = new FileDownload(filename);
            var url = await download.GetDownloadUrl();
            Assert.IsFalse(string.IsNullOrWhiteSpace(url));
            Console.WriteLine("Download url: {0}", url);
            
        }