function validateFileSize(input) { const file = input.files[0]; const maxSize = 20 * 1024 * 1024; // 20MB em bytes if (file && file.size > maxSize) { $('#errorMsg').text('O arquivo é muito grande (máx.: 20MB).'); input.value = ''; // Limpa o arquivo selecionado } else { $('#errorMsg').text(''); // Limpa a mensagem de erro } } function add_documentos() { $.ajaxSetup({ headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') } }); var form_data = new FormData(); var num_usuario = '