Tuesday, June 30, 2009

Re: File Upload validation in cakephp 1.2

I do in this way:

http://trac.chipotle-software.com/karamelo/browser/trunk/app/controllers/users_controller.php

line 236:
public function avatar()
{

I check if fil was uploaded and if is a valid file, in this case an
image:

if ( $type != 'image/jpeg' && $type != 'image/pjpeg' && $type !=
'image/png' && $type != 'image/gif'):

On Jun 30, 3:54 am, bhushan A <bhushanahir...@gmail.com> wrote:
> Hi All,
>
>  I have done with file uploading functionality in cakephp. But i want
> to apply validation (i.e. Please upload file.. ) . How to actieve
> this. I have created $validate array in model.
>  waiting for reply. Please guide me.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: