@@ -1075,14 +1075,14 @@ public static void UploadFile(this WebRequest webRequest, Stream fileStream, str
1075
1075
1076
1076
httpReq . ContentType = "multipart/form-data; boundary=\" " + boundary + "\" " ;
1077
1077
1078
- var boundarybytes = ( "\r \n --" + boundary + "--\r \n " ) . ToAsciiBytes ( ) ;
1078
+ var boundaryBytes = ( "\r \n --" + boundary + "--\r \n " ) . ToAsciiBytes ( ) ;
1079
1079
1080
1080
var header = "\r \n --" + boundary +
1081
1081
$ "\r \n Content-Disposition: form-data; name=\" { field } \" ; filename=\" { fileName } \" \r \n Content-Type: { mimeType } \r \n \r \n ";
1082
1082
1083
- var headerbytes = header . ToAsciiBytes ( ) ;
1083
+ var headerBytes = header . ToAsciiBytes ( ) ;
1084
1084
1085
- var contentLength = fileStream . Length + headerbytes . Length + boundarybytes . Length ;
1085
+ var contentLength = fileStream . Length + headerBytes . Length + boundaryBytes . Length ;
1086
1086
PclExport . Instance . InitHttpWebRequest ( httpReq ,
1087
1087
contentLength : contentLength , allowAutoRedirect : false , keepAlive : false ) ;
1088
1088
@@ -1094,11 +1094,11 @@ public static void UploadFile(this WebRequest webRequest, Stream fileStream, str
1094
1094
1095
1095
using ( var outputStream = PclExport . Instance . GetRequestStream ( httpReq ) )
1096
1096
{
1097
- outputStream . Write ( headerbytes , 0 , headerbytes . Length ) ;
1097
+ outputStream . Write ( headerBytes , 0 , headerBytes . Length ) ;
1098
1098
1099
1099
fileStream . CopyTo ( outputStream , 4096 ) ;
1100
1100
1101
- outputStream . Write ( boundarybytes , 0 , boundarybytes . Length ) ;
1101
+ outputStream . Write ( boundaryBytes , 0 , boundaryBytes . Length ) ;
1102
1102
1103
1103
PclExport . Instance . CloseStream ( outputStream ) ;
1104
1104
}
0 commit comments