Skip to content

Commit

Permalink
docs(module:upload): update index.en-US.md (#7418)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturovt committed May 12, 2022
1 parent 3ae7596 commit 3fc8db2
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions components/upload/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Upload file by selecting or dragging.

## When To Use

Uploading is the process of publishing information (web pages, text, pictures, video, etc.) to a remote server via a web page or upload tool.
Uploading is publishing information (web pages, text, pictures, video, etc.) to a remote server via a web page or upload tool.

- When you need to upload one or more files.
- When you need to show the process of uploading.
Expand All @@ -21,17 +21,17 @@ import { NzUploadModule } from 'ng-zorro-antd/upload';

## API

> You can consult [jQuery-File-Upload](https://github.com/blueimp/jQuery-File-Upload/wiki) about how to implement server side upload interface.
> You can consult [jQuery-File-Upload](https://github.com/blueimp/jQuery-File-Upload/wiki) about how to implement server-side upload interface.
### nz-upload

| Property | Description | Type | Default |
| --- | --- | --- | --- |
| `[nzAccept]` | File types that can be accepted. See [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept) | `string` | - |
| `[nzAction]` | Required. Uploading URL | `string \| ((file: NzUploadFile) => string \| Observable<string>)` | - |
| `[nzDirectory]` | support upload whole directory ([caniuse](https://caniuse.com/#feat=input-file-directory)) | `boolean` | `false` |
| `[nzBeforeUpload]` | Hook function which will be executed before uploading. Uploading will be stopped with `false` or a Observable. **Warning:this function is not supported in IE9**. NOTICE: Must use `=>` to define the method. | `(file: NzUploadFile, fileList: NzUploadFile[]) => boolean \| Observable<boolean>` | - |
| `[nzCustomRequest]` | override for the default xhr behavior allowing for additional customization and ability to implement your own XMLHttpRequest. NOTICE: Must use `=>` to define the method. | `(item) => Subscription` | - |
| `[nzDirectory]` | support uploading the whole directory ([caniuse](https://caniuse.com/#feat=input-file-directory)) | `boolean` | `false` |
| `[nzBeforeUpload]` | Hook function, which will be executed before uploading. Uploading will be stopped with `false` or an Observable. **Warning: this function is not supported in IE9**. NOTICE: Must use `=>` to define the method. | `(file: NzUploadFile, fileList: NzUploadFile[]) => boolean \| Observable<boolean>` | - |
| `[nzCustomRequest]` | Override for the default XHR behavior allowing for additional customization and the ability to implement your own XMLHttpRequest. NOTICE: Must use `=>` to define the method. | `(item) => Subscription` | - |
| `[nzData]` | Uploading params or function which can return uploading params. NOTICE: Must use `=>` to define the method. | `Object \| ((file: NzUploadFile) => Object \| Observable<{}>)` | - |
| `[nzDisabled]` | disable upload button | `boolean` | `false` |
| `[nzFileList]` | List of files, two-way data-binding | `NzUploadFile[]` | - |
Expand All @@ -41,16 +41,16 @@ import { NzUploadModule } from 'ng-zorro-antd/upload';
| `[nzFilter]` | Custom filter when choosed file | `UploadFilter[]` | - |
| `[nzHeaders]` | Set request headers, valid above IE10. NOTICE: Must use `=>` to define the method. | `Object \| ((file: NzUploadFile) => Object \| Observable<{}>)` | - |
| `[nzListType]` | Built-in stylesheets, support for three types: `text`, `picture` or `picture-card` | `'text' \| 'picture' \| 'picture-card'` | `'text'` |
| `[nzMultiple]` | 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` |
| `[nzName]` | The name of uploading file | `string` | `'file'` |
| `[nzShowUploadList]` | Whether to show default upload list, could be an object to specify `showPreviewIcon`, `showRemoveIcon` and `showDownloadIcon` individually | `boolean \| { showPreviewIcon?: boolean, showRemoveIcon?: boolean, showDownloadIcon?: boolean }` | `true` |
| `[nzMultiple]` | Whether to support selected multiple files. `IE10+` supported. You can select multiple files with CTRL holding down while multiple is set to be true | `boolean` | `false` |
| `[nzName]` | The name of the uploading file | `string` | `'file'` |
| `[nzShowUploadList]` | Whether to show the default upload list, could be an object to specify `showPreviewIcon`, `showRemoveIcon` and `showDownloadIcon` individually | `boolean \| { showPreviewIcon?: boolean, showRemoveIcon?: boolean, showDownloadIcon?: boolean }` | `true` |
| `[nzShowButton]` | Show upload button | `boolean` | `true` |
| `[nzWithCredentials]` | ajax upload with cookie sent | `boolean` | `false` |
| `[nzOpenFileDialogOnClick]` | click open file dialog | `boolean` | `true` |
| `[nzPreview]` | A callback function, will be executed when file link or preview icon is clicked. NOTICE: Must use `=>` to define the method. | `(file: NzUploadFile) => void` | - |
| `[nzPreview]` | A callback function will be executed when the file link or preview icon is clicked. NOTICE: Must use `=>` to define the method. | `(file: NzUploadFile) => void` | - |
| `[nzPreviewFile]` | Customize preview file logic. NOTICE: Must use `=>` to define the method. | `(file: NzUploadFile) => Observable<dataURL: string>` | - |
| `[nzPreviewIsImage]` | Customize the preview file is an image, generally used when the image URL is in a non-standard format. NOTICE: Must use `=>` to define the method. | `(file: NzUploadFile) => boolean` | - |
| `[nzRemove]` | A callback function, will be executed when removing file button is clicked, remove event will be prevented when return value is `false` or a Observable. NOTICE: Must use `=>` to define the method. | `(file: NzUploadFile) => boolean \| Observable<boolean>` | - |
| `[nzRemove]` | A callback function will be executed when the removing file button is clicked, remove event will be prevented when the return value is `false` or an Observable. NOTICE: Must use `=>` to define the method. | `(file: NzUploadFile) => boolean \| Observable<boolean>` | - |
| `(nzChange)` | A callback function, can be executed when uploading state is changing | `EventEmitter<NzUploadChangeParam>` | - |
| `[nzDownload]` | Click the method to download the file, pass the method to perform the method logic, do not pass the default jump to the new TAB. | `(file: NzUploadFile) => void` | Jump to new TAB |
| `[nzTransformFile]` | Customize transform file before request | `(file: NzUploadFile) => NzUploadTransformFileType` | - |
Expand All @@ -61,7 +61,7 @@ import { NzUploadModule } from 'ng-zorro-antd/upload';

> The function will be called when uploading is in progress, completed or failed
When uploading state change, it returns:
When uploading state changes, it returns:

```js
{
Expand All @@ -88,7 +88,7 @@ When uploading state change, it returns:

#### nzCustomRequest

Allows for advanced customization by overriding default behavior in `HttpClient`. Provide your own XMLHttpRequest calls to interface with custom backend processes or interact with AWS S3 service through the aws-sdk-js package.
Allows for advanced customization by overriding default behavior in `HttpClient`. Provide your own XMLHttpRequest calls to interface with custom backend processes or interact with AWS S3 service through the `aws-sdk` package.

`nzCustomRequest` callback is passed an object with:

Expand Down

0 comments on commit 3fc8db2

Please sign in to comment.