nfp_sites/app/api/file.js

13 lines
278 B
JavaScript
Raw Normal View History

2019-09-14 19:03:38 +00:00
const { sendRequest } = require('./common')
exports.uploadFile = function(articleId, file) {
let formData = new FormData()
formData.append('file', file)
return sendRequest({
method: 'POST',
url: '/api/articles/' + articleId + '/file',
body: formData,
})
}