nfp_sites/app/api/file.js
2019-09-14 19:03:38 +00:00

12 lines
278 B
JavaScript

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,
})
}