Monday, January 25, 2010

file input box does not return image details in array in $this->data

i have a file input box to attach user's photo using e($form->file
('User.photo'));
but when i post form, i get following array,
Array
(
[User] => Array
(
[photo] => foo.png
)
)

instead i should get the image details regarding image name, type,
tmp_name, size like this below
[image] => Array
(
[name] => foo.png
[type] => image/png
[tmp_name] => temp/path/to/store/a/file
[size] => 56759
)
And because of it, i am unable to upload a photo yet.
Why am i not getting above thing? Did i miss something? Please
help....

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 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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate