nfp_sites/nfp_moe/app/api/file.js
2022-08-02 08:00:57 +00:00

12 lines
276 B
JavaScript

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