move formData generating logic to api.service
This commit is contained in:
parent
562120ae48
commit
903bce40c3
3 changed files with 6 additions and 7 deletions
|
@ -634,9 +634,11 @@ const uploadMedia = ({formData, credentials}) => {
|
|||
.then((data) => parseAttachment(data))
|
||||
}
|
||||
|
||||
const followImport = ({params, credentials}) => {
|
||||
const followImport = ({file, credentials}) => {
|
||||
const formData = new FormData()
|
||||
formData.append('list', file)
|
||||
return fetch(FOLLOW_IMPORT_URL, {
|
||||
body: params,
|
||||
body: formData,
|
||||
method: 'POST',
|
||||
headers: authHeaders(credentials)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue