Skip to content

Commit 61108a8

Browse files
committed
Add variable for Filepicker sources
1 parent 9a4d030 commit 61108a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/FilePicker/FilePicker.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class FilePicker extends React.Component {
2626
const filepickerProgress = this.refs.filepickerProgress
2727

2828
const apikey = this.props.apiKey
29-
const clientOptions = this.props.options.cname ? {cname: this.props.options.cname} : {}
29+
const clientOptions = {}
30+
if (this.props.options.cname) { clientOptions.cname = this.props.options.cname }
3031
const client = filepicker.init(apikey, clientOptions)
3132

3233
const opts = {}
@@ -73,6 +74,7 @@ class FilePicker extends React.Component {
7374
this.props.onSuccess(this.props.options.multiple ? files : files[0])
7475
}
7576
overlayOpts.storeTo = opts.storeTo
77+
overlayOpts.fromSources = this.props.options.fromSources
7678
client.picker(overlayOpts).open()
7779
}
7880

0 commit comments

Comments
 (0)