@ -55,7 +55,7 @@ class Avatar extends React.Component {
className="avatar-uploader"
name="avatar"
showUploadList={false}
action="/upload.do"
action="//jsonplaceholder.typicode.com/posts/"
beforeUpload={beforeUpload}
onChange={this.handleChange}
>
@ -18,7 +18,7 @@ import { Upload, message, Button, Icon } from 'antd';
const props = {
name: 'file',
action: '/upload.do',
action: '//jsonplaceholder.typicode.com/posts/',
headers: {
authorization: 'authorization-text',
},
@ -17,7 +17,7 @@ Use `defaultFileList` for uploaded files when page init.
import { Upload, Button, Icon } from 'antd';
onChange({ file, fileList }) {
if (file.status !== 'uploading') {
console.log(file, fileList);
@ -25,7 +25,7 @@ const props = {
multiple: true,
showUploadList: false,
onChange(info) {
const status = info.file.status;
if (status !== 'uploading') {
@ -65,7 +65,7 @@ class MyUpload extends React.Component {
}
render() {
onChange: this.handleChange,
};
@ -50,7 +50,7 @@ class PicturesWall extends React.Component {
return (
<div className="clearfix">
<Upload
listType="picture-card"
fileList={fileList}
onPreview={this.handlePreview}
@ -18,7 +18,7 @@ If uploade file is picture, a thumbnail can be shown. `IE8/9` do not support loc
listType: 'picture',
defaultFileList: [{
uid: -1,