Vue Tencent cloud upload video SDK upload progress cannot be displayed

Time:2020-10-31

Upload official video documents: https://cloud.tencent.com/document/product/266/9239

error message

Local debugging can display the progress of video upload, or print to the browser console. However, after being published to the server, it will no longer respond to the uploading event (media)_ Progress).

It suddenly occurred to me that similar problems had been solved before.

Cause of error

mock!!!! It’s the reason of mock code!!!

because main.js The mockxhr module of mock is imported in    

import { mockXHR } from '../mock'
 if (process.env.NODE_ENV === 'production') {
   mockXHR()
 }

Solution

Just need to block the above code, and then publish to the server, it is solved.