Skip to content

Commit 044a001

Browse files
committed
Doc: Update file upload notes
1 parent 9e71bbd commit 044a001

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

TODO

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
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

docs/asciidoc/context.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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"]

jooby/src/main/java/io/jooby/ServerOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)