blob转file并传给后端
const files = new window.File([data], `${new Date().getTime()}.jpg`, { type: data.type }) |
然后再用接口请求,例如axios
axios.post('url',formData).then(res => { |
评论
const files = new window.File([data], `${new Date().getTime()}.jpg`, { type: data.type }) |
然后再用接口请求,例如axios
axios.post('url',formData).then(res => { |