Hi everyone, I still having problems with get upload working in my App...
I have found this App -> www.sanisoft-demo.com/photoBlog/index.php?url=/posts/add and its just that i need :P I have found the code of this App, but, unhapppiness, the code is too old(2005)... and dont work anymore, the functions have changed... everything has changed... I´m using the 1.2 version... and i wanna know if somebody can help me to do the same kind of example... A Post Model that have an Image field... because i have a Model called User ( id, name, address, photo ) and i want that the form have the fields name( text ), address( textarea ), photo( file ). And the file must be uploaded to the server, when it get submited... Can someone help me with this ? Please, i m stucked for 1 week without awnser... Bye Thx for all :) On 12 mar, 21:44, "haj" <[EMAIL PROTECTED]> wrote: > I'm trying to use the same component right now and having problems > (I'm a noob Baker myself, BTW, so bear with me) > > First, I'm using supposedly version 1.1 file (got by clicking 1.1 > link) in which the comment inside says 1.0 but I assume it is 1.1. > > I gues your code is directly copied from the > post:http://groups.google.com/group/cake-php/msg/adc714b8bf025edf > > Now, here's what I'm finding... (I'm still in the middle of > understanding this component, so this is just posting a little memo > tip I've found so far) > > the file input filed is expected like as: <input type="file" > name="filefield" size="60"> > you can't do: $html->input('Controller/filefield', array('size' => > '60')) > > now, for the physical folder, assuming you have > htdocs\cakefolder\app\webroot\files > (the above is a case of Windows, of course) > > you set upload method in your controller as: > > $this->FileHandler->upload('filefield', 'files/'); > > This should work (under php4). I didn't thoroughly read your post and > I'm just assuming it's a simple path problem. > > This component sets various errors inside but there's no method which > displays it so make a simple is useful... > Put this at the bottom of class definition: > > function printError() { echo $this->errorMessage; } > > Of course, it's a quick hack do more proper way if needs be. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
