Open 501956430 opened 2 months ago
axios.post('/upload',formData, { headers: { 'Content-Type': 'multipart/form-data' }, withCredentials: true, onUploadProgress: (progressEvent) => { console.log(progressEvent); const percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total); onProgress(percentCompleted, progressEvent); }, }) .then((res) => { onSuccess('上传成功'); console.log(res); }) .catch((err) => { onError('上传失败'); });
添加了onUploadProgress 请求就不执行。
有没哪位大侠可以帮帮我
Basic Info
添加了onUploadProgress 请求就不执行。