Hello,
The funny thing is - when I try to upload a doc file more then 2040kB - error message shows
- when I try to upload differ file format (size about 2048kB) - error message shows
π€ BUT! If I upload jpg file of 30Mb size - no error shows and e-mail with empty fields sends
π Thanks in advance for any help!
The settings below:
The funny thing is - when I try to upload a doc file more then 2040kB - error message shows
- when I try to upload differ file format (size about 2048kB) - error message shows
π€ BUT! If I upload jpg file of 30Mb size - no error shows and e-mail with empty fields sends
π Thanks in advance for any help!
The settings below:

Hi Krionis,
ChronoForms can't see the file until after it is uploaded. My best guess is that 30MB is more than the Max File Upload setting in your php.ini file so the file never gets uploaded at all. ChronoForms then sees an empty Files array and assumes that there is no file upload to handle.
Bob
ChronoForms can't see the file until after it is uploaded. My best guess is that 30MB is more than the Max File Upload setting in your php.ini file so the file never gets uploaded at all. ChronoForms then sees an empty Files array and assumes that there is no file upload to handle.
Bob
Thanks for reply,
What about custom code event after upload event, something like this:
I tried that, but nothing happens
What about custom code event after upload event, something like this:
function validateSize() {
if ( $.browser.msie ) {
var myFSO = new ActiveXObject("Scripting.FileSystemObject");
var filepath = document.getElementById('file_attachment').value;
var thefile = myFSO.getFile(filepath);
var size = thefile.size;
}else {
var fileInput = $("#file_attachment")[0];
var size = fileInput.files[0].size; // Size returned in bytes.
}
if(size > 10485060){// 10485060 = 10Mb
alert('To big file for uploading (10Mb - max)');
//Clean upload field
document.getElementById('file_attachment').parentNode.innerHTML = document.getElementById('file_attachment').parentNode.innerHTML;
}
}
jQuery('#file_attachment').change(validateSize);
I tried that, but nothing happens
Hi Krionis ,
That looks like a JavaScript snippet that needs to run in the Browser - the On Submit events all run on the server and can only use PHP scripts.
Bob
That looks like a JavaScript snippet that needs to run in the Browser - the On Submit events all run on the server and can only use PHP scripts.
Bob
Hi Krionis,
Just check your server's max file upload size setting first ? this should save everybody's time!π
Regards,
Max
Just check your server's max file upload size setting first ? this should save everybody's time!π
Regards,
Max
This topic is locked and no more replies can be posted.