Skip to content

ExtPoint/fileup-redux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fileup-redux

Redux adapter to fileup-core

Installation

  1. Append fileup reducer to application reducers:
import fileup from 'fileup-redux/lib/reducers/fileup';

export default combineReducers({
    fileup,
    //...
});
  1. Decorate you React Component with fileup:
import fileup from 'fileup-redux';

class MyFiles extends React.Component {

    render() {
        return (
            <div>
                {this.props.files.map(file => (
                    <div key={file.uid}>
                        {file.name}
                    </div>
                ))}
                <button onClick={() => this.props.uploader.browse()}>Browse</button>
            </div>
        );
    }

}

export default fileup({
    backendUrl: '/file/upload/',
})(MyFiles);

HOC configuration

  • id Unique identifier in redux store
  • backendUrl Backend url to file upload
  • uploader FileUp configuration

About

Redux adapter to fileup-core

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published