blob: a04e4d8a4249d92d1fd7cd6eeb50c62c9b9f843a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import * as types from '../../types'
import { store, history } from '../../store'
import { api, post, pad, preloadImage } from '../../util'
import actions from '../../actions'
import { session } from '../../session'
export const upload = file => dispatch => {
const formData = {
'image': file,
'username': 'animism', // session('username'),
}
// console.log(formData)
return actions.upload.upload(formData).then(data => {
// console.log(data.res)
return data.res
})
}
|