CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 RESOVLED Trouble with Upload component validation

Print topic Send  topic

Author Message
beevet

Posts: 47
Posted: 06/05/2012, 4:21 PM

I am not sure what I am doing wrong, but looking for any input.

I have a page with a record that makes an email and sends it in the after insert event. It also allows a picture to be uploaded. A thumbnail and a smaller picture are made and stored with the after process file event on the upload component.

The upload component is set to have a file size limit of 5000000. the allowed file masks are *.JPG;*.jpeg;*.gif. I did not set the disallowed file masks.

If I upload a picture under that size, it uploads, makes the other pictures, inserts the record and sends the email.

If I try to upload a picture that is too big it just goes to the return page. There is no file uploaded, no error, but there is a record made in the database.

It seems at one point, it did give me the red error at top saying the file was too big and stopping any further movement, but now it doesn't. I can also choose other file types (like .mov) and not get an error on that. Just no upload, sent to the return page.

Any thoughts?

Thanks,

Chris


View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 06/27/2012, 6:09 PM

beevet,

Have you gotten a solution for this issue yet?
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 06/29/2012, 2:30 AM

Try putting custom code like this in the records on validate event:

if ($recordname->FileUpload1->GetValue() == NULL){
$recordname->Errors->addError("Document is required.");
}

Obviously, substitute $recordname with the name of your form that has the upload component.

Let me know how it goes.
_________________
Central Coast, NSW, Australia.

View profile  Send private message
beevet

Posts: 47
Posted: 06/29/2012, 2:44 AM

Sorry for not getting back to this sooner.

As I said, I am not sure what I was doing wrong. I remade the page (using the same steps or so I thought), deleted the old page, republished and all was good in the world. Perhaps in cleaning stuff up I deleted something inadvertently or changed a setting somewhere. The new page worked out of the gate as expected.

Thanks for the the help.

Chris
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.