Skip to content

Commit

Permalink
Update upload document
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Oct 11, 2016
1 parent 38962e1 commit e0a986e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
22 changes: 11 additions & 11 deletions components/upload/index.en-US.md
Expand Up @@ -20,18 +20,18 @@ Uploading is the process of publishing information (web pages, text, pictures, v
| Property | Description | Type | Default|
|------------|----------------------------------------------------| ----------- |--------|
| name | Optional. The name of uploading file | String | file |
| defaultFileList | Optional. Default list of files that have been uploaded. | Array[Object] | - |
| fileList | Optional. List of files that have been uploaded. | Array[Object] | - |
| name | The name of uploading file | String | 'file' |
| defaultFileList | Default list of files that have been uploaded. | Array[Object] | - |
| fileList | List of files that have been uploaded (controlled). Here is a common issue [#2423](https://github.com/ant-design/ant-design/issues/2423) when using it | Array[Object] | - |
| action | Required. Uploading URL | String | - |
| data | Optional. Uploading params or function which can return uploading params. | Object or function(file) | - |
| headers | Optional. Set request headers, valid above IE10. | Object | - |
| showUploadList | Optional. Whether to show uploadList. | Boolean | true |
| multiple | Optional. Whether to support selected multiple file. `IE10+` supported. You can select multiple files with CTRL holding down while multiple is set to be true | Boolean | false |
| accept | Optional. File types that can be accepted. See [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept) | String | - |
| beforeUpload | Optional. Hook function which takes an argument: the uploaded file, will be executed before uploading. Uploading will be stopped with `false` or a rejected Promise returned. **Warning:this function is not supported by old IE**| Function | - |
| onChange | Optional. A callback function, can be executed when uploading state is changing. See [onChange](#onChange) | Function | - |
| listType | Optional. Built-in stylesheets, support for two types: `text` or `picture` | String | 'text'|
| data | Uploading params or function which can return uploading params. | Object or function(file) | - |
| headers | Set request headers, valid above IE10. | Object | - |
| showUploadList | Whether to show uploadList. | Boolean | true |
| multiple | Whether to support selected multiple file. `IE10+` supported. You can select multiple files with CTRL holding down while multiple is set to be true | Boolean | false |
| accept | File types that can be accepted. See [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept) | String | - |
| beforeUpload | Hook function which takes an argument: the uploaded file, will be executed before uploading. Uploading will be stopped with `false` or a rejected Promise returned. **Warning:this function is not supported by old IE**| Function | - |
| onChange | A callback function, can be executed when uploading state is changing. See [onChange](#onChange) | Function | - |
| listType | Built-in stylesheets, support for two types: `text` or `picture` | String | 'text'|
| onPreview | A callback function, will be executed when file link is clicked. | Function(file) | - |
| onRemove | A callback function, will be executed when removing file button is clicked | Function(file) | - |
| supportServerRender | Need to be turned on while the server side is rendering.| Boolean | false |
Expand Down
20 changes: 10 additions & 10 deletions components/upload/index.zh-CN.md
Expand Up @@ -21,17 +21,17 @@ title: Upload
| 参数 | 说明 | 类型 | 默认值|
|------------|--------------------------------------------------------------| ----------- |-------|
| name | 可选参数, 上传的文件 | String | file |
| defaultFileList | 可选参数,默认已经上传的文件列表 | Array[Object] ||
| fileList | 可选参数,已经上传的文件列表 | Array[Object] ||
| name | 发到后台的文件参数名 | String | 'file' |
| defaultFileList | 默认已经上传的文件列表 | Array[Object] ||
| fileList | 已经上传的文件列表(受控),使用此参数时,如果遇到 `onChange` 只调用一次的问题,请参考 [#2423](https://github.com/ant-design/ant-design/issues/2423) | Array[Object] ||
| action | 必选参数, 上传的地址 | String ||
| data | 可选参数, 上传所需参数或返回上传参数的方法 | Object or function(file) ||
| headers | 可选参数, 设置上传的请求头部,IE10 以上有效 | Object ||
| showUploadList | 可选参数, 是否展示 uploadList, 默认开启 | Boolean | true |
| multiple | 可选参数, 是否支持多选文件,`ie10+` 支持。开启后按住 ctrl 可选择多个文件。 | Boolean | false |
| accept | 可选参数, 接受上传的文件类型, 详见 [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept) | String ||
| beforeUpload | 可选参数, 上传文件之前的钩子,参数为上传的文件,若返回 `false` 或者 Promise 则停止上传。**注意:该方法不支持老 IE**| Function ||
| onChange | 可选参数, 上传文件改变时的状态,详见 onChange | Function ||
| data | 上传所需参数或返回上传参数的方法 | Object or function(file) ||
| headers | 设置上传的请求头部,IE10 以上有效 | Object ||
| showUploadList | 是否展示 uploadList, 默认开启 | Boolean | true |
| multiple | 是否支持多选文件,`ie10+` 支持。开启后按住 ctrl 可选择多个文件。 | Boolean | false |
| accept | 接受上传的文件类型, 详见 [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept) | String ||
| beforeUpload | 上传文件之前的钩子,参数为上传的文件,若返回 `false` 或者 Promise 则停止上传。**注意:该方法不支持老 IE**| Function ||
| onChange | 上传文件改变时的状态,详见 onChange | Function ||
| listType | 上传列表的内建样式,支持两种基本样式 `text` or `picture` | String | 'text'|
| onPreview | 点击文件链接时的回调 | Function(file) ||
| onRemove | 点击移除文件时的回调 | Function(file) ||
Expand Down

1 comment on commit e0a986e

@afc163
Copy link
Member Author

@afc163 afc163 commented on e0a986e Oct 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For #2423

Please sign in to comment.