
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
filestack-react
Advanced tools
This is the official React component for Filestack API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
Install filestack-react
through npm
npm install filestack-react
or
yarn add filestack-react
var ReactFilestack = require('filestack-react');
In ES2015
import ReactFilestack from 'filestack-react';
You should register Filestack website and get an API key first!
1. Custom Designed button
<ReactFilestack
apikey={YOUR_API_KEY}
buttonText="Click me"
buttonClass="classname"
options={options}
onSuccess={this.yourCallbackFunction}
/>
2. Custom render
<ReactFilestack
apikey={apikey}
options={options}
onSuccess={onSuccess}
onError={onError}
render={({ onPick }) => (
<div>
<strong>Find an avatar</strong>
<button onClick={onPick}>Pick</button>
</div>
)}
/>
3. Other modes
<ReactFilestack
apikey={YOUR_API_KEY}
mode="upload"
options={options}
onSuccess={onSuccess}
/>
Available modes:
Define your own options object and callback function, connect them to the component and get the result from Filestack:
const options = {
accept: 'image/*',
maxFiles: 5,
storeTo: {
location: 's3',
},
};
onSuccess(result) {
// handle result here
}
Do you prefer a link instead of a button?
You can pass a custom prop link.
<ReactFilestack
apikey={YOUR_API_KEY}
options={options}
onSuccess={this.yourCallbackFunction}
link
/>
You can find the example in /examples/demo
.
Official Filestack Documentation
apikey
required, string. An API key for Filestack.
mode
optional, string. default 'pick'. Can be one of pick, upload, transform, retrieve, metadata, remove.
file
optional object. use it to insert a file object in upload mode.
onSuccess
optional function. Handle the results after a successful response.
onError
optional function. Handle errors.
options
optional object. Detailed options to customize the mode behavior.
See Javascript API from theofficial documentation.
security
optional object. If you have security enabled, you will need to initialize the client with a valid Filestack policy and signature in order to perform the requested call.
buttonText
optional string. When using a custom button, you can set the text.
buttonClass
optional string. When using custom button, you can set className to style it.
Filestack Python SDK follows the Semantic Versioning.
If you have problems, please create a Github Issue.
Please see CONTRIBUTING.md for details.
1.0.0 (June 10, 2017)
react
, react-dom
and prop-types
to the latest versions to removeFAQs
Official React component for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
The npm package filestack-react receives a total of 33,683 weekly downloads. As such, filestack-react popularity was classified as popular.
We found that filestack-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.