File Upload

Hello all,

Has anyone got some tips on validating files when uploaded? Validation in the model is a lot cleaner than in the controller and therefore I was hoping to retain this balance when uploading files.

Has anyone found file upload validation as implemented in the model?

What kind of validations do you want to do?

Thanks for the response Chovy. Firstly there is a file uploaded and secondly to check that the file does not contain zero bites. I would like to keep everything in the model if possible.


I find that attachment_fu doesn't give informative error messages, aside from "Picture is invalid".