File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,12 @@ final _newlineRegExp = new RegExp(r"\r\n|\r|\n");
24
24
/// var uri = Uri.parse("http://pub.dartlang.org/packages/create");
25
25
/// var request = new http.MultipartRequest("POST", uri);
26
26
/// request.fields['user'] = '[email protected] ';
27
- /// request.files.add(new http.MultipartFile.fromFile (
27
+ /// request.files.add(new http.MultipartFile.fromPath (
28
28
/// 'package',
29
- /// new File( 'build/package.tar.gz') ,
29
+ /// 'build/package.tar.gz',
30
30
/// contentType: new MediaType('application', 'x-tar'));
31
- /// request.send().then((response) {
32
- /// if (response.statusCode == 200) print("Uploaded!");
33
- /// });
31
+ /// var response = await request.send();
32
+ /// if (response.statusCode == 200) print('Uploaded!');
34
33
class MultipartRequest extends BaseRequest {
35
34
/// The total length of the multipart boundaries used when building the
36
35
/// request body. According to http://tools.ietf.org/html/rfc1341.html, this
You can’t perform that action at this time.
0 commit comments