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 9894b3dad882f3f12fc50ce3988b436ca0aff6fc..5677a399f7f9394a6c051900362c03aff885a5cb 100644 |
--- a/pkg/http/lib/src/multipart_file.dart |
+++ b/pkg/http/lib/src/multipart_file.dart |
@@ -85,7 +85,7 @@ class MultipartFile { |
static Future<MultipartFile> fromFile(String field, File file, |
{String filename, ContentType contentType}) { |
if (filename == null) filename = new Path(file.name).filename; |
- return file.length().transform((length) { |
+ return file.length().then((length) { |
return new MultipartFile(field, file.openInputStream(), length, |
filename: filename, |
contentType: contentType); |