I'm creating a form and allowing users to upload a file. The question i have is how do i specify the file size limit? I'm using the phpFormGenerator 3.0 and it has a field called : File size limit. I'm trying to make the limit 10mbs, so i put the number 10.00. However, when trying to upload a file of size 7mbs, it gives me an error and says "File _____ was not uploaded", when i try a smaller file, it goes through.
Any ideas?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As far as I can tell this is an unimplemented feature. I will look at what it takes to implement it in your code. Will you send me you processor.php code in an email?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Would you guys mind sharing the solution to this because I can't seem to get anything to upload. I already checked with my host and my file permissions are set. I did get a file to upload once a long time ago, but now nothing seems to.
I just created a test form with one field: an upload field and i set the file size to 50000. Is that bytes? Even still I uploaded a file that was only 4KB and it wouldn't upload.
Also where in the code does it specify what the file size limit is? The first form I did a while ago, I think i specified 20000 for file size and my test one today is 50000, but i don't see any difference between the code for each form.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
File size limits can be set in multiple places.
Your web host may impose file size limits based on your "hosting package".
Limits can be set using a unique copy of the php.ini file for your site.
You can set additional limits within your own code that override (smaller only) the ini file.
Create this file and point your browser to it to see what your host is limiting the file size to. There is alot of information here but you will find the file size limit somewhere.
Filename: phpenv.php
<?php
phpinfo();
?>
There are many ways to accomplish file upload size limits. Without researching all the possibilities and then guessing on how to implement it on your form your best bet is to create that simple form, find where the limit is being checked then set a small number and start checking how big of a file you can actually upload. Once you find the threshold you can determine if the limit number represents Bytes, KBytes, or something else. Then just set the number to the real file limit you want to impose on your users.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm creating a form and allowing users to upload a file. The question i have is how do i specify the file size limit? I'm using the phpFormGenerator 3.0 and it has a field called : File size limit. I'm trying to make the limit 10mbs, so i put the number 10.00. However, when trying to upload a file of size 7mbs, it gives me an error and says "File _____ was not uploaded", when i try a smaller file, it goes through.
Any ideas?
As far as I can tell this is an unimplemented feature. I will look at what it takes to implement it in your code. Will you send me you processor.php code in an email?
If you care to do modifications yourself here is a good example.
http://www.phpeasystep.com/workshopview.php?id=3
i sent you the processor.php, ill look at that link. ty
Inserted code as shown in the example. It should work for you. I replied to your email so you should have already received it.
Would you guys mind sharing the solution to this because I can't seem to get anything to upload. I already checked with my host and my file permissions are set. I did get a file to upload once a long time ago, but now nothing seems to.
I just created a test form with one field: an upload field and i set the file size to 50000. Is that bytes? Even still I uploaded a file that was only 4KB and it wouldn't upload.
Also where in the code does it specify what the file size limit is? The first form I did a while ago, I think i specified 20000 for file size and my test one today is 50000, but i don't see any difference between the code for each form.
File size limits can be set in multiple places.
Your web host may impose file size limits based on your "hosting package".
Limits can be set using a unique copy of the php.ini file for your site.
You can set additional limits within your own code that override (smaller only) the ini file.
Create this file and point your browser to it to see what your host is limiting the file size to. There is alot of information here but you will find the file size limit somewhere.
Filename: phpenv.php
<?php
phpinfo();
?>
There are many ways to accomplish file upload size limits. Without researching all the possibilities and then guessing on how to implement it on your form your best bet is to create that simple form, find where the limit is being checked then set a small number and start checking how big of a file you can actually upload. Once you find the threshold you can determine if the limit number represents Bytes, KBytes, or something else. Then just set the number to the real file limit you want to impose on your users.