asierra
Posts: 9
|
| Posted: 09/25/2009, 4:19 PM |
|
Hi
I need to display an error warning that the user is uploading a file passed the file size limit.
For some odd reason, everytime I upload something passed that limit:
On both Insert and Update, it clears my entire form without giving me any warning.
On Update, it tries to execute an Update query with just the where statement when I have no required fields on the form. If there is a required field, it will shoot an error saying the field is required.
On both occasions, It will actually re-execute the select query for the record but will continue to leave my record form blank.
Not sure if this is a bug on my end .....
Should an error message spit out automatically if the file is bigger than the allowed limit??
Has anyone ever seen what I have described before?
Thanks
_________________
-AL |
 |
 |
damian
Posts: 838
|
| Posted: 09/27/2009, 4:44 AM |
|
set max file size in the upload properties
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
asierra
Posts: 9
|
| Posted: 09/27/2009, 6:15 AM |
|
Hi Damian
Thanks for the response.
It is a required field so it is already being set to 5mb or 5242880 bytes.
I am going to try creating a new project and see if I can replicate my issue.
It is just very odd behavior.
Using CC 4.2.00.040
_________________
-AL |
 |
 |
quasimidi
Posts: 151
|
| Posted: 09/28/2009, 2:09 AM |
|
Useful link to calculate beetween bytes/kbytes, etc.:
http://webdeveloper.earthweb.com/repository/javascripts/2001/04/41291/byteconverter.htm
_________________
RS |
 |
 |
asierra
Posts: 9
|
| Posted: 09/28/2009, 4:42 AM |
|
Hi quasimidi
Thanks for your response and link.
The issue is not setting the file size limit, its what happens when a end user adds a file over the limit.
I am getting odd behavior, which I described in my original post. to this thread.
I tried a new project, create a simple file upload form and I am still getting the same results.
It only happens when a user tries to upload a file over the set limit.
Other than that, it works perfectly fine.
Thanks
_________________
-AL |
 |
 |
jjrjr1
Posts: 942
|
| Posted: 09/29/2009, 2:40 AM |
|
I have a question
What exactly happens if you tru and upload a file past the size limit???
Does the file upload?
Is the database updated with the uploaded filename in your table??
If you are expecting a warnin before the upload is attempted, you will need to build that somehow yourself client site. CCS creates this check server side so basically what that means is if you set your max upload size to 5meg and you upload a 6 meg file, the 6 meg file will completely upload before an error will be generated.
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
asierra
Posts: 9
|
| Posted: 09/29/2009, 7:34 AM |
|
@jjrjr1
Thanks for you response.
Quote :What exactly happens if you tru and upload a file past the size limit???
It does what it is supposed to do, does not upload nor update the database table if I try to upload a file above 5mb.
The issue is what it does when you try to do so.
When I am adding a new record, if you try to upload a file past the exceeded file size, it will not insert my record and clear out the entire form. It does not shoot any 'error' warning to the user.
What it should do is preserve the fields they have filled out and prompt the user it is exceeding the file size limit.
When I am updating a record, if you try to upload a file past the exceeded file size, it clears my entire form out, and the error it spits back is a mysql error.
When I checked debugging for mysql in Codecharge, it attempts a "where record_id={actual_record_id}" query (obviously will fail) and then executes a Select statement for that record.
What it should do is preserve the record fields and prompt the user it is exceeding the file size limit.
Its odd behavior and I don't think there is nothing wrong with my implementation (since it works)
I want to know if others have experienced the same issue or perhaps I am missing something.
_________________
-AL |
 |
 |
jjrjr1
Posts: 942
|
| Posted: 09/29/2009, 9:37 AM |
|
Be sure you have validation enabled for the control & Form
Also select preserve parameters GET and POST
See if that makes a difference
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
|