This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.2 » who can help me!!!!about upload files
who can help me!!!!about upload files [message #101437] Tue, 22 June 2010 17:17
csc1986  is currently offline csc1986
Messages: 1
Registered: June 2010
Junior Member
$this->gesform = new UserForm();
$this->gesform->setgestionnaire();
$type = $request->getParameter('type');
if($request->isMethod("POST") && $type == 'mygesuser')
{
$this->gesform = new UserForm();
$this->gesform->bind($request->getParameter($this->gesform- >getName()),$request->getFiles($this->gesform->getName()));

if ($this->gesform->isValid())
{
$file = $this->gesform->getValue('photo');
$filename = 'uploaded_'.sha1($file->getOriginalName());
$extension = $file->getExtension($file->getOriginalExtension());
$file-> save(sfConfig::get('sf_upload_dir').'/'.$filename.$extension );
}

$this->gesform->setField('photo', $fileName);
$this->gesform->save();


}
these are my codes. and the error is:
Fatal error: Call to a member function getOriginalName() on a non-object in /home/patrimmo/www/apps/frontend/modules/adminagence/actions /actions.class.php on line 68
Previous Topic:cache - random
Next Topic:configuration apache? but i have lighttpd help
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software