Thursday, December 31, 2009

When I use Media View ,my session deleted

i use my custom auth system in my project and it save user
informatin into session(no used Auth Component)


$this->Session->write( 'Cms.User', array (...) );


when is use This Code


function profile_donwload( $paperID )
{
if ( $file = $this->Paper->Attachment->read( null, $paperID ) )
{
$this->view = 'Media';
$params = array(
'id' => 'paper.'.$file['Attachment']['format'],
'name' => $file['Attachment']['fname'],
'download' => true,
'extension' => $file['Attachment']['format'],
'path' => WWW_ROOT .'data'.DS.$file['Attachment']
['for'].DS.$file['Attachment']['paper_id'].DS
);
$this->set($params);
}
}


after Downloading file or Canceling it ,my session's deleted,why ?

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

No comments: