它的价值是什么
fileUpload
FileUpload
最初是否渲染?如前所述,这只会设置
文件上传
FineUploaderS3
文件上传
componentWillReceiveProps()
要更新
folderName
文件上传
组件,因为最后一个渲染的组件将获胜)。
class FileUploadComponent extends Component {
constructor(props) {
super(props)
// We can't use an arrow function for the key function below as we need to
// access both this component's props and the FileUploader instance within it
let component = this
this.uploader = new qq.s3.FineUploader({
// ...
objectProperties: {
key(fileId) {
return `${component.props.folderName}/${this.getUuid(fileId)}`
}
}
})
}
render() {
return <div>
<Gallery uploader={this.uploader}/>
</div>
}
}