If the upload is being performed via the POST form, the page refreshes to send the data.
If upload is being performed via Ajax , you can use a global variable to control upload status:
var variavelGlobalControloUpload;
function minhaFuncaoUpload() {
// upload começou, dar a conhecer à variavel de controlo
variavelGlobalControloUpload = 'a carregar';
}
function atualizaPagina () {
// Verifica se não está a carregar
if (variavelGlobalControloUpload != 'a carregar') {
// codigo para atualizar a pagina aqui!
}
}
Note: This is a concept, you should adapt the same to your reality.