const files = new window.File([data], `${new Date().getTime()}.jpg`, { type: data.type })
const formData = new FormData()
formData.append('file', files)

然后再用接口请求,例如axios

axios.post('url',formData).then(res => {
...
});