Skip to content

Commit 68fa2e2

Browse files
committed
Merge pull request #5 from andy-williams/ashx_corrupt_file_fix
corrupt file fix
2 parents 9432508 + e9f85c7 commit 68fa2e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/asp_net/Handler.ashx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ public class Handler : IHttpAsyncHandler
268268
{
269269
using (Stream FileStreamWriter = new FileStream(FileName, FileMode.CreateNew, FileAccess.Write))
270270
{
271-
FromStreamToStream(context.Request.InputStream, FileStreamWriter);
271+
var inputStream = context.Request.Files.Get(0).InputStream;
272+
FromStreamToStream(inputStream, FileStreamWriter);
272273
}
273274
}
274275
catch (Exception exception)

0 commit comments

Comments
 (0)