I had to do this with pdf/xls files returned by a webservice.  I took
the default media view (/cake/libs/views/media.php) and copied it to /
app/views/app_media.php.

Then I modified it so that it checked for a $content view var and
wrote that to a tmpfile.
Here's the diff:
http://bin.cakephp.org/view/1310700342

-Matt
http://www.pseudocoder.com

On Mar 30, 1:05 pm, "Mark (Germany)" <[email protected]>
wrote:
> i tried to use the media view for files generated on the fly (some
> exported text inside a export.txt or whatever)
> but it seems like the media view can only handle downloads of
> "existing" files on the server
>
> trying to rewrite it did not turn out very well
> so, did anyone manage to create a txt file to download, that is filled
> with the echoed content
>
> echo 'blabla'
> or
> $content = 'blabla' transfered to the media view
>
> without creating locale (temp.) files on the server?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to