Were the file uploads working before you used Sanitize::clean? Because
cake doesn't handle file uploads automatically. Aside from having to
set array('type'=>'file') in your $form->create() statement, you also
need to move/save the uploaded file yourself.

Unless you're manually moving the file, either to a permanent upload
directory or into a database or something, the web server (and cake)
has no way of knowing what you want to do with the file. It'll just
sit in the temp directory until the script terminates, at which point
the file will be deleted.

On May 19, 3:37 am, Michele Ferri <[email protected]> wrote:
> Hello.
>
> I'm using Sanitize::clean for cleaning the $this->data arrays in the
> controllers before saving them to the db.
>
> example
> if (!empty($this->data))
> {
>         $this->data = Sanitize::clean($this->data);
>         [...]
>
> }
>
> The problem is that if a form contains a file input, the file is not
> uploaded. The file array is correctly populated after the post (with
> tmp_name and everything), but the physical file is not present in the
> upload folder.
>
> Is there any workaround for this?
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to