File tree Expand file tree Collapse file tree
jooby/src/main/java/io/jooby Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11* review toString on Value API (removal of QueryStringValue?)
22* tests and coverage
3- * server options from application.conf MUST override hardcoded settings
43* make reset headers on error configurable
54* netty reports a leak in MVC body
65
Original file line number Diff line number Diff line change @@ -362,7 +362,7 @@ Form-data must be present in the HTTP body and encoded as `multipart/form-data`:
362362
363363 String pass = ctx.multipart("pass").value(); // <4>
364364
365- FileUpload pic = ctx.multipart ("pic").fileUpload(); // <5>
365+ FileUpload pic = ctx.file ("pic"); // <5>
366366
367367 User user = ctx.multipart(User.class); // <6>
368368
@@ -399,7 +399,7 @@ class User {
399399
400400 val pass = ctx.multipart("pass").value() // <4>
401401
402- val pic = ctx.multipart ("pic").fileUpload() // <5>
402+ val pic = ctx.file ("pic") // <5>
403403
404404 val user = ctx.multipart<User>() // <6>
405405
@@ -421,11 +421,11 @@ curl -F id=root -F pass=root -F pic=@/path/to/local/file/profile.png http://loca
421421<5> javadoc:FileUpload[] variable `pic`
422422<6> Form as `User` object => `User(id=root, pass=pwd, pic=profile.png)`
423423
424- [TIP ]
424+ [NOTE ]
425425.File Upload
426426====
427427
428- You may prefer to use one of the utility methods:
428+ File upload are available ONLY for multipart requests.
429429
430430.Java
431431[source,java,role="primary"]
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ public class ServerOptions {
4444
4545 /** Number of worker (a.k.a application) threads. It is the number of processors multiply by
4646 * <code>8</code>. */
47- public static final int WORKER_THREADS = IO_THREADS * 8 ;
47+ public static final int WORKER_THREADS = Runtime . getRuntime (). availableProcessors () * 8 ;
4848
4949 /** HTTP port. Default is <code>8080</code> or <code>0</code> for random port. */
5050 private int port = DEFAULT_PORT ;
You can’t perform that action at this time.
0 commit comments