PDA

View Full Version : Validate size of the file



chuvinha
12 Jan 2011, 4:23 AM
Hi guys, I am not able to validate size of the file.




var fieldArquivo = new Ext.ux.form.FileUploadField({
id: 'campoArquivoUpload',
fieldLabel : 'Arquivo',
name : 'arquivoPDF',
allowBlank:false
});


And my getFotmr()




Ext.getCmp('btnSalvarProdutoArquivo').setHandler(
function(){
Ext.getCmp('arquivoForm').getForm().submit({
url: 'arquivo!save.action',
waitMsg: 'Salvando o arquivo...',
success: successCRUDProdutoArquivo,
failure: failureCRUDArquivo
});
});


Would someone have any examples to validate file's size before calling the action?