Welcome Guest, Not a member yet? Register   Sign In
How can I validate a file upload using Form_validation?
#4

[eluser]Mike Ryan[/eluser]
No, it doesn't. How about:

1) Validation callback does the upload, and stores the file in a temporary area
2) Uploaded file is checked according to your rules
3a) Validation failed: Delete temporary file, validation errors
3b) Validation passed: Your controller can move the temporary file to its intended locatation

Depending how large your files are you could also store them in between requests, so when another field fails to validate they do not need to re-upload them (perhaps by storing the temporary name in the user's session).


Messages In This Thread
How can I validate a file upload using Form_validation? - by El Forum - 04-29-2009, 08:10 AM
How can I validate a file upload using Form_validation? - by El Forum - 04-29-2009, 10:00 AM
How can I validate a file upload using Form_validation? - by El Forum - 04-29-2009, 10:14 AM
How can I validate a file upload using Form_validation? - by El Forum - 04-29-2009, 10:36 AM
How can I validate a file upload using Form_validation? - by El Forum - 04-30-2009, 02:36 AM
How can I validate a file upload using Form_validation? - by El Forum - 05-04-2009, 02:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB