Skip to content

Commit 6992aa4

Browse files
add capture attribute (#264)
1 parent af49a95 commit 6992aa4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ React.render(<Upload />, container);
6767
|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) |
6868
|headers| object | {} | http headers to post, available in modern browsers |
6969
|accept | string | | input accept attribute |
70+
|capture | string | | input capture attribute |
7071
|multiple | boolean | false | only support ie10+|
7172
|onStart | function| | start upload file |
7273
|onError| function| | error callback |

src/AjaxUploader.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ class AjaxUploader extends Component<UploadProps> {
269269
style,
270270
multiple,
271271
accept,
272+
capture,
272273
children,
273274
directory,
274275
openFileDialogOnClick,
@@ -308,6 +309,7 @@ class AjaxUploader extends Component<UploadProps> {
308309
key={this.state.uid}
309310
style={{ display: 'none' }}
310311
accept={accept}
312+
capture={capture}
311313
{...dirProps}
312314
multiple={multiple}
313315
onChange={this.onChange}

0 commit comments

Comments
 (0)