| Index: pkg/http/lib/src/multipart_file.dart
|
| diff --git a/pkg/http/lib/src/multipart_file.dart b/pkg/http/lib/src/multipart_file.dart
|
| index 29ef589c024c016e9f40771c3c081c67829dd2c6..19c03bf12ce2158ae40d2a8d7be2ac40dbf6edf2 100644
|
| --- a/pkg/http/lib/src/multipart_file.dart
|
| +++ b/pkg/http/lib/src/multipart_file.dart
|
| @@ -5,6 +5,7 @@
|
| library multipart_file;
|
|
|
| import 'dart:async';
|
| +import 'dart:convert';
|
| import 'dart:io';
|
|
|
| import 'package:path/path.dart' as path;
|
| @@ -70,14 +71,14 @@ class MultipartFile {
|
| contentType = contentType == null ? new ContentType("text", "plain")
|
| : contentType;
|
| var charset = contentType.charset;
|
| - var encoding = encodingForCharset(contentType.charset, Encoding.UTF_8);
|
| + var encoding = encodingForCharset(contentType.charset, UTF8);
|
| // Make a new contentType with ensured charset.
|
| contentType = new ContentType(contentType.primaryType,
|
| contentType.subType,
|
| charset: encoding.name,
|
| parameters: contentType.parameters);
|
|
|
| - return new MultipartFile.fromBytes(field, encodeString(value, encoding),
|
| + return new MultipartFile.fromBytes(field, encoding.encode(value),
|
| filename: filename,
|
| contentType: contentType);
|
| }
|
|
|