Skip to content

Commit

Permalink
add capture attribute (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
almond-bongbong authored Oct 20, 2021
1 parent af49a95 commit 6992aa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ React.render(<Upload />, container);
|data| object/function(file) | | other data object to post or a function which returns a data object(a promise object which resolve a data object) |
|headers| object | {} | http headers to post, available in modern browsers |
|accept | string | | input accept attribute |
|capture | string | | input capture attribute |
|multiple | boolean | false | only support ie10+|
|onStart | function| | start upload file |
|onError| function| | error callback |
Expand Down
2 changes: 2 additions & 0 deletions src/AjaxUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ class AjaxUploader extends Component<UploadProps> {
style,
multiple,
accept,
capture,
children,
directory,
openFileDialogOnClick,
Expand Down Expand Up @@ -308,6 +309,7 @@ class AjaxUploader extends Component<UploadProps> {
key={this.state.uid}
style={{ display: 'none' }}
accept={accept}
capture={capture}
{...dirProps}
multiple={multiple}
onChange={this.onChange}
Expand Down

0 comments on commit 6992aa4

Please sign in to comment.