zhengyangyong commented on a change in pull request #47: General development
dir translation and include img
URL:
https://github.com/apache/incubator-servicecomb-docs/pull/47#discussion_r215144869
##########
File path: java-chassis-reference/en_US/general-development/file-upload.md
##########
@@ -1,54 +1,54 @@
-文件上传,当前支持在vertx rest通道和servlet rest中使用。
+File upload, currently supported in vertx rest channel and servlet rest.
-文件上传使用标准的http form格式,可与浏览器的上传直接对接。
+File uploads use the standard http form format, which can directly upload the
file from the browser.
-## Producer:
-支持jaxrs和springmvc开发模式
+## Producer:
+Support jaxrs and springmvc development mode
-jaxrs开发模式:
-* 支持servlet定义的javax.servlet.http.Part类型
+Jaxrs development model:
+* javax.servlet.http.Part type that supports servlet definitions
-* 可以直接使用@FormParam传递文件类型及普通参数
+* You can directly use @FormParam to pass file types and common parameters
-springmvc开发模式:
+Springmvc development mode:
-*
支持servlet定义的javax.servlet.http.Part类型,也支持org.springframework.web.multipart.MultipartFile类型
+* Supports servlet-defined javax.servlet.http.Part type, also supports
org.springframework.web.multipart.MultipartFile type
-* 两种数据类型功能是一致的,MultipartFile的底层也是Part
+* The two datatype functions are consistent, and the underlying part of
MultipartFile is also Part
-* 两种数据类型可以混合使用,比如第一个参数是Part,第二个参数是MultipartFile
+* Two data types can be mixed, for example, the first parameter is Part and
the second parameter is MultipartFile
-* 可以直接使用@RequestPart传递文件类型及普通参数
+* You can directly use @RequestPart to pass file types and common parameters
-注意:
+note:
-* 先配置文件上传临时目录,默认为null不支持文件上传,文件上传请求Content-Type必须为multipart/form-data
+* First file upload temporary directory, the default is null does not support
file upload, file upload request Content-Type must be multipart/form-data
-* 同名参数只支持一个文件
+* The same name parameter only supports one file
-* 支持一次传输多个不同参数名的文件
+* Supports transferring files with multiple different parameter names at one
time
-* 通过MultipartFile或Part打开流后,记得关闭,否则上传的临时文件会无法删除,最终导致上传临时目录被撑爆
+* After opening the stream through MultipartFile or Part, remember to close
it. Otherwise the uploaded temporary file will not be deleted, and eventually,
the upload temporary directory will be exploded.
-Springmvc模式下的代码样例:
+Sample code in Springmvc mode:
```java
@PostMapping(path = "/upload", consumes = MediaType.MULTIPART_FORM_DATA)
public String fileUpload(@RequestPart(name = "file1") MultipartFile file1,
@RequestPart(name = "file2") Part file2, @RequestPart String param1) {
- ……
+ ......
}
```
-### 配置说明:
+### Configuration instructions:
Review comment:
instructions -> Introduction
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services