Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: README.md

Issue 955593002: Update project to match OSS template (Closed) Base URL: git@github.com:dart-lang/mime.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LICENSE ('k') | codereview.settings » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #MIME type package 1 #MIME type package
2 2
3 Package for working with MIME type definitions and for processing 3 Package for working with MIME type definitions and for processing
4 streams of MIME multipart media types. 4 streams of MIME multipart media types.
5 5
6 ##Determining the MIME type for a file 6 ##Determining the MIME type for a file
7 7
8 The `MimeTypeResolver` class can be used to determine the MIME type of 8 The `MimeTypeResolver` class can be used to determine the MIME type of
9 a file. It supports both using the extension of the file name and 9 a file. It supports both using the extension of the file name and
10 looking at magic bytes from the begining of the file. 10 looking at magic bytes from the begining of the file.
(...skipping 24 matching lines...) Expand all
35 // HTTP request with content type multipart/form-data. 35 // HTTP request with content type multipart/form-data.
36 HttpRequest request = ...; 36 HttpRequest request = ...;
37 // Determine the boundary form the content type header 37 // Determine the boundary form the content type header
38 String boundary = request.headers.contentType.parameters['boundary']; 38 String boundary = request.headers.contentType.parameters['boundary'];
39 39
40 // Process the body just calculating the length of each part. 40 // Process the body just calculating the length of each part.
41 request.transform(new MimeMultipartTransformer(boundary)) 41 request.transform(new MimeMultipartTransformer(boundary))
42 .map((part) => part.fold(0, (p, d) => p + d)) 42 .map((part) => part.fold(0, (p, d) => p + d))
43 .listen((length) => print('Part with length $length')); 43 .listen((length) => print('Part with length $length'));
44 44
45 Take a look at the `HttpBodyHandler` in the [http_server][1] package for 45 Take a look at the `HttpBodyHandler` in the [http_server][http_server]
46 handling different content types in a HTTP request. 46 package for handling different content types in a HTTP request.
47 47
48 [1]: https://pub.dartlang.org/packages/http_server 48 ## Features and bugs
49
50 Please file feature requests and bugs at the [issue tracker][tracker].
51
52 [tracker]: https://github.com/dart-lang/sample/issues
53 [http_server]: https://pub.dartlang.org/packages/http_server
OLDNEW
« no previous file with comments | « LICENSE ('k') | codereview.settings » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698