File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,8 @@ customRequest callback is passed an object with:
113113
114114abort(file?: File) => void: abort the uploading file
115115
116+ showOpenFilePicker() => void: open file picker
117+
116118## License
117119
118120rc-upload is released under the MIT license.
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ class AjaxUploader extends Component<UploadProps> {
4141 this . reset ( ) ;
4242 } ;
4343
44+ showOpenFilePicker = ( ) => {
45+ this . fileInput ?. click ( ) ;
46+ } ;
47+
4448 onClick = ( e : React . MouseEvent < HTMLDivElement > | React . KeyboardEvent < HTMLDivElement > ) => {
4549 const el = this . fileInput ;
4650 if ( ! el ) {
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ class Upload extends Component<UploadProps> {
2929 this . uploader . abort ( file ) ;
3030 }
3131
32+ showOpenFilePicker ( ) {
33+ this . uploader . showOpenFilePicker ( ) ;
34+ }
35+
3236 saveUploader = ( node : AjaxUpload ) => {
3337 this . uploader = node ;
3438 } ;
You can’t perform that action at this time.
0 commit comments