Hi all, I am solved my problem like this, $this->redirect($this->getRequest()->getUriPrefix().$file->getFilePath());
or you can use like this,
$this->getController()->redirect($file->getFilePath(), 0, 302);
thanks ...
Salı 24 Temmuz 2007 tarihinde, Timu EREN şunları yazmıştı:
> 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)
signature.asc
Description: This is a digitally signed message part.
