From 73d8d91cdcc51123f9f8b3313a091b03fc238a58 Mon Sep 17 00:00:00 2001 From: Gerard Smit Date: Mon, 2 Jan 2023 14:14:13 +0100 Subject: [PATCH] Fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b1694b..6dd3693 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Then upload the file the file with `UploadAsync`. This can be done two ways: string path = @"TestFiles/test.pdf"; string fileName = "test.pdf"; - using (System.IO.Stream stream = await File.ReadAllBytesAsync(path)) + using (System.IO.Stream stream = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read)) { await _cloudConvertAPI.UploadAsync(uploadTask.Result.Form.Url.ToString(), stream, fileName, uploadTask.Result.Form.Parameters); }