admin on rest send extra params to rest call

本小妞迷上赌 提交于 2019-12-02 00:49:26

You'll have to implement a custom input for that.

Something like (haven't tested it):

class UploadPictureInput extends Component {
    handleClick = () => {
        cloudinary.openUploadWidget({
            cloud_name: 'demo',
            upload_preset: 'sh3432',
            cropping: 'server'
        }, (error, result) => {
            this.props.input.onChange(result);
        });
    }

    render() {
        return (
            <FlatButton
                style={styles.button}
                label="Upload Image"
                primary
                onClick={this.handleClick}
            />
        );
    }
}

And use this input in your form.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!