Hi all,
I want to make a basic download counter and i write like this,

public function executeDownload()
{
        $file = FilesPeer::retrieveByPK($this->getRequestParameter('id'));
        $this->forward404Unless($file)
        $file->setDownloadCounter($file->getDownloadCounter() + 1);
        $file->save();

        //getFilePath return this /files/2007/04/somefile.pdf
        $this->redirect($file->getFilePath()); 
} 

but comming header from server like this

        Location: /files/2007/

why can't redirect to a file?

(i don't read file content  becouse some files very big )

-- 
Saygılar && İyi çalışmalar
Timu EREN (a.k.a selam)

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to