Ejemplo n.º 1
0
        public async Task ImportUploadFileTest()
        {
            var filename  = @"Resume11.pdf";
            var filepath  = @"Source/";
            var fileBytes = File.ReadAllBytes(Path.Combine(filepath, filename));

            var taskModel = await cloudConvertClient.Import(fileBytes, filename);

            Assert.IsNotNull(taskModel, taskModel.data.code);

            var file_md5 = StaticMethods.CreateMD5(fileBytes);

            foreach (var file in taskModel.data.result.files)
            {
                Assert.AreEqual(file.md5.Trim('"'), file_md5.ToLower());
            }

            Console.WriteLine(taskModel.data.id);
        }