Skip to content

Commit c7c936b

Browse files
authored
[Upload]: support capture attribute (#303)
* [Upload]: support capture attribute * 4.1.0
1 parent e66bf4a commit c7c936b

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

docs/examples/simple.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const uploaderProps = {
2727
onError(err) {
2828
console.log('onError', err);
2929
},
30+
capture: 'user',
3031
};
3132

3233
const Test = () => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-upload",
3-
"version": "4.0.1",
3+
"version": "4.1.0",
44
"description": "upload ui component for react",
55
"keywords": [
66
"react",

src/AjaxUploader.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ class AjaxUploader extends Component<UploadProps> {
266266
openFileDialogOnClick,
267267
onMouseEnter,
268268
onMouseLeave,
269+
capture,
269270
...otherProps
270271
} = this.props;
271272
const cls = classNames({
@@ -302,6 +303,7 @@ class AjaxUploader extends Component<UploadProps> {
302303
{...dirProps}
303304
multiple={multiple}
304305
onChange={this.onChange}
306+
{...(capture != null ? { capture } : {})}
305307
/>
306308
{children}
307309
</Tag>

0 commit comments

Comments
 (0)