JavaScript: el tamaño del archivo se mide en bytes

if (s > 4 * 1024 * 1024)
    alert("Too big");
Obedient Osprey