|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
Join Date: Dec 2005
Posts: 87
|
cakePHP and file uploads
When I create a form without a file upload field in cakephp, I am able to update the database. But when I add file upload fields, the database does not update. Here is my code:
controller: PHP Code:
PHP Code:
PHP Code:
|
|
|
|
|
|
#2 |
|
Member (7 bit)
Join Date: Dec 2005
Posts: 87
|
I figured it out:
The file field returns as an array instead of a single value, causing save to fail. What I needed was a line of code setting $this->data['Car']['front'] to a single value, in this case, the tmp_name of the uploaded image. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|