use jsonplaceholder, close #5202

pull/5208/head
afc163 8 years ago
parent 0a35197a35
commit d502f089dd

@ -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';
const props = {
action: '/upload.do',
action: '//jsonplaceholder.typicode.com/posts/',
onChange({ file, fileList }) {
if (file.status !== 'uploading') {
console.log(file, fileList);

@ -25,7 +25,7 @@ const props = {
name: 'file',
multiple: true,
showUploadList: false,
action: '/upload.do',
action: '//jsonplaceholder.typicode.com/posts/',
onChange(info) {
const status = info.file.status;
if (status !== 'uploading') {

@ -65,7 +65,7 @@ class MyUpload extends React.Component {
}
render() {
const props = {
action: '/upload.do',
action: '//jsonplaceholder.typicode.com/posts/',
onChange: this.handleChange,
multiple: true,
};

@ -50,7 +50,7 @@ class PicturesWall extends React.Component {
return (
<div className="clearfix">
<Upload
action="/upload.do"
action="//jsonplaceholder.typicode.com/posts/"
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
import { Upload, Button, Icon } from 'antd';
const props = {
action: '/upload.do',
action: '//jsonplaceholder.typicode.com/posts/',
listType: 'picture',
defaultFileList: [{
uid: -1,

Loading…
Cancel
Save