
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
react-dropbox-filepicker
Advanced tools
React Component to select a Dropbox file.
This project assumes:
npm install --save react-dropbox-filepicker<FilePicker /> component in your appIMPORTANT:
In this initial version of react-dropbox-filepicker I'm using components from Semantic UI React.
In order for components to render correctly, you need to add a Theme as described here.
import FilePicker from "react-dropbox-filepicker";
const APP_KEY = 'YOUR DROPBOX APP KEY';
class YourComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
accessToken: null,
filepath: null,
};
}
render() {
const { accessToken, filepath } = this.state;
return (
<FilePicker
appKey={APP_KEY}
accessToken={accessToken}
filepath={filepath}
onLogin={token => this.setState({ accessToken: token })}
onLogout={() => this.setState({ accessToken: null, filepath: null })}
onFilePick={path => this.setState({ filepath: path })}
onError={error => console.error(error.message)}
/>
)
}
}
The FilePicker accepts the following arguments:
appKey
You can obtain your app key from the Dropbox App console.accessToken
The user's Dropbox access token.onLogin() callback will provide you the accessToken value once the user logs in. Your app must persist this value and pass it back to the <FilePicker />.filepath
Path to the Dropbox file that was picked by the user.onFilePick() callback will provide you the filepath once the user picks a file. Your app must persist this value and pass it back to the <FilePicker />.onLogin()
Executed when the user connects to Dropbox.onLogout()
Executed when the user disconnects from Dropbox.onFilePick()
Executed when the user selects a file.onError()
Executed when an unexpected error happens.The example folder has a simple app that uses the DropboxFilePicker and saves all data as local state.
To run the example:
http://localhost:8080/ as a valid Redirect URInpm install
APP_KEY='YOUR DROPBOX APP KEY' npm start
Run: npm run build && npm publish
FAQs
React Component to select a Dropbox file.
We found that react-dropbox-filepicker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.