|
|
|
@ -50,7 +50,7 @@ function VideoUploadList (props) {
|
|
|
|
|
}
|
|
|
|
|
const _beforeunload = beforeunload // .bind(this, noUploads, state)
|
|
|
|
|
|
|
|
|
|
const username = props.match.params.username
|
|
|
|
|
const username = props.match.params.username || props.CourseUser
|
|
|
|
|
const { showNotification, history } = props;
|
|
|
|
|
const uploaderOptions = {
|
|
|
|
|
|
|
|
|
@ -237,15 +237,16 @@ function VideoUploadList (props) {
|
|
|
|
|
})
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
// to success page
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
dispatch({type: 'removeAll'})
|
|
|
|
|
// setCouldRouteNav(true)
|
|
|
|
|
if(flag){
|
|
|
|
|
successFunc(false)
|
|
|
|
|
}else{
|
|
|
|
|
history.push(`/users/${username}/videos/success`)
|
|
|
|
|
if(response){
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
dispatch({type: 'removeAll'})
|
|
|
|
|
if(flag){
|
|
|
|
|
successFunc(false)
|
|
|
|
|
}else{
|
|
|
|
|
history.push(`/users/${username}/videos/success`)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
|