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