1
I took a Function here from the Internet to try to validate my field 'file', which will be for the client to send photos, I want the client can not leave the field 'file' empty, without any upload, and I want it to be at most 300mb, and that is in the format or jpeg or jpg or png. I only got a code to validate if it’s over 300MB, I just don’t know if you’re totally right, this:
function validafoto() {
var upload = document.cad.getElementById("upload");
var size = upload.files[0].size;
if(size > 3145728) { //3MB
alert('Não permitido'); //Acima do limite
return false;
}
And now I don’t know how to call it in my form, I tried it in my validarformular Function, but it didn’t work out very well, could it help? I’ll leave the entire code of my form here: https://docs.google.com/document/d/e/2PACX-1vSFeShPqOtM5dO6_swPcERh52AQyMS3TdMo2fgP_aRvyj4TslepSfQq1I8yUwglb3tvkrJxQ1cwGD1-/pub
A jpeg of 300mb? It’s a photo of Hubble? rs
– Sam
@dvd
300mb=3MB
, each100mb
vale1MB
capisce– user60252
@Leocaracciolo knew not to
– Sam