PPE React Storage
React Library Component for upload/view files. Easy to use. Upload to server support.
Live demo
Insert gif or link to demo
Setup
Install React Storage with npm
npm install @tienlucky/storage
Get API key at https://link-to-project
Add API key at .env
file.
REACT_APP_CODEBY_STORAGE_URL=https://package-storage.codeby.com/file-s3
REACT_APP_CODEBY_STORAGE_TOKEN=xxx
Usage/Examples
import {Image} from '@tienlucky/storage'
import {useEffect, useState} from "react";
import "@tienlucky/storage/src/tienlucky-storage.min.css";
const App = () => {
const [value, setValue] = useState()
useEffect(() => {
console.log('useEffect value', value)
}, [value])
return (
<>
<Image.SingleUpload
value={value}
onChange={setValue}
/>
<hr/>
<Image.View image={value}/>
</>
)
}
export default App
Support
For support, email tiennv.ppe@gmail.com
or join our Slack channel.