nfp_sites/app/api/media.js

14 lines
271 B
JavaScript
Raw Normal View History

2019-02-22 14:53:43 +00:00
const m = require('mithril')
const { sendRequest } = require('./common')
exports.uploadMedia = function(file) {
let formData = new FormData()
formData.append('file', file)
return sendRequest({
method: 'POST',
url: '/api/media',
2019-09-13 13:33:10 +00:00
body: formData,
2019-02-22 14:53:43 +00:00
})
}