Skip to content

Commit 4f13f81

Browse files
committed
1 parent bea0c8a commit 4f13f81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RestSharp/RestRequest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public IRestRequest AddFile(string name, string path, string contentType = null)
202202
ContentLength = fileLength,
203203
Writer = s =>
204204
{
205-
using (var file = new StreamReader(new FileStream(path, FileMode.Open)))
205+
using (var file = new StreamReader(new FileStream(path, FileMode.Open, FileAccess.Read)))
206206
{
207207
file.BaseStream.CopyTo(s);
208208
}

0 commit comments

Comments
 (0)